ballouta Posted April 23, 2009 Share Posted April 23, 2009 Hello I have a small image with a link to the top of the page, it does NOT work on Internet Explorer but it works on Firefox. the code in html page that displays this small top image is: <div id="footer"> <div id="fLeft"> <div id="fRight"> <div id="inside"> <span class="top"><a href="#top">#top</a></span> <!-- of course there's more code after this !--> I noticed that there's a bookmark in the page names top, its code is: <div id="wrap"><a name="top" id="top"></a> Going to CSS code, this part of it: #wrap{ padding:0; width:797px; margin:0 auto; } /********************** footer Style **********************/ #footer{ float:left; background:url(../images/footer_bg.gif) repeat-x; padding-bottom:50px; } #footer #fLeft{ background:url(../images/footer_bg_left.gif) no-repeat left top; float:left; } #footer #fLeft #fRight{ background:url(../images/footer_bg_right.gif) no-repeat right top; float:right; } #footer #fLeft #fRight #inside{ float:left; padding:33px 20px; width:757px; } Actually I removed the book mark and set this top image hyperlink to #top, it worked on Internet Explorer but didn't work on Mozilla!! Would you please help me fix it, I don't care if there's bookmark or not, if I were using an old html file in the past, I used to make a hyperlink #top and it used to work but never tried it on Mozilla. Thank you Quote Link to comment Share on other sites More sharing options...
mimintweak Posted April 24, 2009 Share Posted April 24, 2009 wouldn't <a href="#top"> need to be <a href="page.html">#top or something similar? Quote Link to comment Share on other sites More sharing options...
SuperBlue Posted April 25, 2009 Share Posted April 25, 2009 The #top is the standard way to link to the top of the page, as far as i know atleast. But it would still make more sense to throw in a few ids on your headings, the first heading (the h1) could be considered the top of the page, so you could name it section1. <h1 id="section1">Main Subject / First Heading<h1> You would then link to this section, by adding #section1 to the end of the URL. There is rarely any reason to link Directly to the top anyway, so linking to the first heading is fine. You could also simply throw in id="top" on the body opening tag, that should make it work in IE. Quote Link to comment Share on other sites More sharing options...
ballouta Posted April 25, 2009 Author Share Posted April 25, 2009 thank you section1 solved the problem Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.