HTML Anchor Jump Doesn't Work - css

The title means what it says. when i setup a link to jump to a certain div it doesn't work. For example when i say <a href="#Section1>Section 1</a> and click it, it should jump to the anchor tag with the name of 'Section1' <a name="Section1"></> but nothing happens.
<main id="Main">
<div class="Container">
<div class="Section-Links Left Box-Sizing">
<div class="Links">
Test Post
Test Post
Test Post
Test Post
Test Post
Test Post
Test Post
Test Post
Test Post
Test Post
</div>
</div>
<div class="Sections Left Box-Sizing">
<div class="Section">
<a name="Test"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div class="Section">
<a name="Test2"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div class="Section">
<a name="Test3"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div class="Section">
<a name="Test4"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div class="Section">
<a name="Test5"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div class="Section">
<a name="Test6"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div class="Section">
<a name="Test7"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div class="Section">
<a name="Test8"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div class="Section">
<a name="Test9"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div class="Section">
<a name="Test10"></a>
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
</div>
<div class="Clear"></div>
</div>
<p class="Footer-Masthead">Created By Moussa Harajli.</p>
</main>
if you would like to test this go here. http://67.184.73.19/Projects/Assassins/rules.php

Anchor links doesn't point to names but to ids
so change for example:
<a name="Test7"></a>
to:
<a id="Test7"></a>
And you should not change the capitalization of the ids in the id attribute and the links.

Try setting the id in the div tag:
<div id="test" class="Section">...</div>
And this should work:
Test Post

The reason behind your problem is that you have different ID's in your links since test2 is not the same as Test2.
Though... from my experience the <a> element is essentially redundant since the following works in all modern browsers:
<main id="Main">
<div class="Container">
<div class="Section-Links Left Box-Sizing">
<div class="Links">
Test Post
Test Post
</div>
</div>
<div class="Sections Left Box-Sizing">
<div id="test" class="Section">
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>
<div id="test2" class="Section">
<span class="Section-Title">Test Section</span>
<p class="Section-Text">Some Random Words Here.</p>
</div>

Related

Bootstrap grid - center-block doesnt position elements in the center - why?

I have a question. I have a bootstrap (3) grid with 2 columns. insight the right column I am using 'center-block' to position elements in the center. For some reason it doesnt do nothing. What am I doing wrong? Thanks!!
https://jsfiddle.net/codingcodingcoding/mbw45xdh/1/
<section id="contact">
<div class="container-fluid">
<h2 class="section-heading text-center">Let's Get In Touch!</h2>
<div class="row">
<div class="col-md-6">
<div id="googleMap"></div>
</div>
<div class="col-md-6">
<div class="center-block">
<span class="glyphicon glyphicon-earphone phone-icon"></span>
<span class="glyphicon glyphicon-envelope email-icon"></span>
<p>
feedback#example.com
</p>
</div>
</div>
</div>
</div>
</section>
You have to use your text-center class in div element
like:
<section id="contact">
<div class="container-fluid">
<div class="text-center">
<h2 class="section-heading">Let's Get In Touch!</h2>
</div>
<div class="row">
<div class="col-md-6">
<div id="googleMap"></div>
</div>
<div class="col-md-6">
<div class="center-block">
<span class="glyphicon glyphicon-earphone phone-icon"></span>
<span class="glyphicon glyphicon-envelope email-icon">
</span>
<p>
<a href="mailto:your-email#your-
domain.com">feedback#example.com</a>
</p>
</div>
</div>
</div>
</div>
</section>

How to overaly with an height transform css3

I'm trying to create a group of boxes where in the beginning has few info, and when hovering displays more info.
I achieved it but I have a problem related with the position of the other boxes. Every time I hover over one box, the others change their position because I'm applying a height and a width in hover. It work fine if I comment height and width in hover but I need to maintain de box-shadow at all time
Here you can check the test: https://jsfiddle.net/p4av5ejv/
HTML:
<div class="partnerLlistat">
<div id="partnerBox" class="partnerBox">
<div id="partnerData">
<h3>Field1: Test test</h3>
<h4>Field2: test</h4>
<p id="type">Field3: test</p>
<p id="address">Field4: test</p>
<p id="phone">Field5: 111</p>
<p id="web">Field6: <a ref="external" target="_blank" href="http://test.net">http://test.net</a></p>
<p id="mail">Field7: test#gmail.com</p>
<p id="offer">Field8: test test</p>
</div>
</div>
<div id="partnerBox" class="partnerBox">
<div id="partnerData">
<h3>Field1: Test test</h3>
<h4>Field2: test</h4>
<p id="type">Field3: test</p>
<p id="address">Field4: test</p>
<p id="phone">Field5: 111</p>
<p id="web">Field6: <a ref="external" target="_blank" href="http://test.net">http://test.net</a></p>
<p id="mail">Field7: test#gmail.com</p>
<p id="offer">Field8: test test</p>
</div>
</div>
<div id="partnerBox" class="partnerBox">
<div id="partnerData">
<h3>Field1: Test test</h3>
<h4>Field2: test</h4>
<p id="type">Field3: test</p>
<p id="address">Field4: test</p>
<p id="phone">Field5: 111</p>
<p id="web">Field6: <a ref="external" target="_blank" href="http://test.net">http://test.net</a></p>
<p id="mail">Field7: test#gmail.com</p>
<p id="offer">Field8: test test</p>
</div>
</div>
<div id="partnerBox" class="partnerBox">
<div id="partnerData">
<h3>Field1: Test test</h3>
<h4>Field2: test</h4>
<p id="type">Field3: test</p>
<p id="address">Field4: test</p>
<p id="phone">Field5: 111</p>
<p id="web">Field6: <a ref="external" target="_blank" href="http://test.net">http://test.net</a></p>
<p id="mail">Field7: test#gmail.com</p>
<p id="offer">Field8: test test</p>
</div>
</div>
</div>
CSS:
I cannot define CSS code because I don't know how to format well to be valid. Check in jsFiddle link.
Can anybody help me with this?, I googled a lot and stackoverflowing a lot but nothing exactly what I need.
Thank you for your time!
OK. I found the solution.
HTML
<li id="partnerBox" class="partnerBox">
<h3>Nom: aaa</h3>
<h4 class="VisibleOnHover">Entitat: aaa</h4>
<p>Tipus de servei: aaa</p>
<div class="VisibleOnHover">
<p>Adreça: aaa</p>
<p>Telèfon: 111</p>
<p>Pàgina web: <a ref="external" target="_blank" href="http://aaa.net">http://aaa.net</a></p>
<p>Correu electrònic: aaa#gmail.com</p>
<p>Avantatge que ofereix: aaa aaa</p>
</div>
</li>
<li id="partnerBox" class="partnerBox">
<h3>Nom: bbb bbb</h3>
<h4 class="VisibleOnHover">Entitat: bbb</h4>
<p>Tipus de servei: bbb</p>
<div class="VisibleOnHover">
<p>Adreça: bbb</p>
<p>Telèfon: 111</p>
<p>Pàgina web: <a ref="external" target="_blank" href="http://bbb.net">http://bbb.net</a></p>
<p>Correu electrònic: bbb#gmail.com</p>
<p>Avantatge que ofereix: bbb bbb</p>
</div>
</li>
<li id="partnerBox" class="partnerBox">
<h3>Nom: ccc ccc</h3>
<h4 class="VisibleOnHover">Entitat: ccc</h4>
<p>Tipus de servei: ccc</p>
<div class="VisibleOnHover">
<p>Adreça: ccc</p>
<p>Telèfon: 111</p>
<p>Pàgina web: <a ref="external" target="_blank" href="http://ccc.net">http://ccc.net</a></p>
<p>Correu electrònic: ccc#gmail.com</p>
<p>Avantatge que ofereix: ccc ccc</p>
</div>
</li>
<li id="partnerBox" class="partnerBox">
<h3>Nom: ddd ddd</h3>
<h4 class="VisibleOnHover">Entitat: ddd</h4>
<p>Tipus de servei: ddd</p>
<div class="VisibleOnHover">
<p>Adreça: ddd</p>
<p>Telèfon: 111</p>
<p>Pàgina web: <a ref="external" target="_blank" href="http://ddd.net">http://ddd.net</a></p>
<p>Correu electrònic: ddd#gmail.com</p>
<p>Avantatge que ofereix: ddd ddd</p>
</div>
</li>
</ul>
Again, I don't know how to insert formatted CSS here, so check jsfiddle link to see this code.
Check this to see how to solve that. In jsfiddle you cannot appreciate well, because you have to tune the padding and margin in the .partnerLlistat > li[id^="partnerBox"]:hover rule to your site.

How to specify the URL of a linked item in Semantic UI?

When using a "Link Item", begun with <div class="ui divided link items">, in Semantic UI (as per the manual: http://semantic-ui.com/views/item.html), where should I specify the URL of the page I would like the item to link to?
I tried wrapping the whole <div class="item"> within <a>, but doing so breaks the formatting of the item such that the content appears below the picture.
You can sub your div.item with a.item like in this fiddle or HTML below:
<div class="ui divided link items">
<a class="item" href="http://www.google.com" target="_blank">
<div class="ui tiny image">
<img src="http://www.semantic-ui.com/images/avatar/large/stevie.jpg">
</div>
<div class="content">
<div class="header">Google</div>
<div class="description">
<p></p>
</div>
</div>
</a>
<a class="item" href="http://www.yahoo.com" target="_blank">
<div class="ui tiny image">
<img src="http://www.semantic-ui.com/images/avatar/large/veronika.jpg">
</div>
<div class="content">
<div class="header">Yahoo!</div>
<div class="description">
<p></p>
</div>
</div>
</a>
<a class="item" href="http://duckduckgo.com/" target="_blank">
<div class="ui tiny image">
<img src="http://www.semantic-ui.com/images/avatar/large/jenny.jpg">
</div>
<div class="content">
<div class="header">DuckDuckGo</div>
<div class="description">
<p></p>
</div>
</div>
</a>
</div>

How to code schema.org for national searches?

My client would like their company name (the run throughout the US) to come up in a goolge search based on the zip code a user puts in the google. I figured it must be schema.org..I have found a similar site and this is the code source I found:
<!-- Top Bar -->
<div id="top_toolbar" class="clearfix">
<div class="container">
<div class="breadcrumbContainer">
<div class="breadcrumb" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> <span itemprop="title">TITLE HERE</span> </div>
<div class="breadcrumb" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> <span> <span itemprop="title">TITLEHERE </span> </span></div>
<div class="breadcrumb" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> <span> <span itemprop="title">In </span> </span></div>
</div>
</div>
</div>
If I was to google search "Something in 49117" this is the source code:
<div id="top_toolbar" class="clearfix">
<div class="container">
<div class="breadcrumbContainer">
<div class="breadcrumb" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> <span itemprop="title">TITLEHERE</span> </div>
<div class="breadcrumb" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> <span> <span itemprop="title">TITLEHERE </span> </span></div>
<div class="breadcrumb" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> <span> <span itemprop="title">In </span> </span></div>
<div class="breadcrumb" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> <span> <span itemprop="title">49117 </span> </span></div>
<div class="breadcrumb" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> <span itemprop="title">Instant Quote</span> </div>
</div>

Keep CSS only modal window from jumping to the top of the page

Is there any way to keep a CSS only modal from jumping to the top of the page?
<a href="#modal-1" />MODAL LINK</a>
<div id="modal-1" class="modal">
<div class="modal-content">
<div class="header">
<i class="fa fa-times-circle fa-2x"/>XX</i>
</div>
<div class="copy">
<p>CONTENT GOES HERE</p>
</div>
<div class="cf footer">
</div>
</div>
<div class="overlay"></div>
</div>
Use href="javascript:void(0)" instead of href="#"

Resources