[Solved] Firefox Anchor Links
# February 17, 2013 at 3:24 am
Long-time reader, first-time poster…
I know this isn’t a CSS question, but it does relate to the use of IDs as anchor targets…
I recently put together a one-page website, using anchor links. This works fine in all browsers, except Firefox (Mac and Windows).
Having hunted around the web, I’ve tried setting:
<a id="x" name="x"></a>
… as my target – but that made no difference. As far as I knew, we just needed:
… these days.
Does anyone have a quick solution for me?
If you need to see the page in question, you’ll find it over at http://www.do-not-shop4usb.co.uk
Many thanks in advance.# February 17, 2013 at 4:28 pm
believe it or not, Firefox may be correct here. All the section child divs are floating, so they’re taken out of the document flow. The target anchors have no content and nothing to size them, so they’re essentially 0 in height, as is the parent sections. So all the sections effectively stack up on the top of the page. Contain the floats and it will work (I’d use either overflow: hidden or clearfix on section).# August 29, 2013 at 1:36 pm
Hola! This problem was absolutely infuriating me to no end. (although most coding problems do :)
I am using FireFox 23.0.1 and unfortunately the display:inline fix above was insufficient as it broke other portions of the layout.
I inserted the following into the HEAD of the HTML doc:
You must be logged in to reply to this topic.