|
|
#1 |
|
Intra-page linking
Hey everyone, here is the catch. I want my link to, when clicked, link to a place further down on the page. However I have a fixed header that stays in its spot despite the scrolling of the page, so I want the title I am linking to to appear say about 150px from the top. Is there a way to intra-page link to a place further down the page so that it loads the title 150px from the top?
I know normally an intra page link is <a href="#here">click here</a> <a name="here" id="here">It loads here</a> However 'It loads here' would appear at the very top of the screen (thus covered by the fixed banner), were as I want it to load 150px down. Can anyone help me solve this problem? |
|
|
|
0
|
|
|
#2 |
|
The correct answer is to not use floating headers like that. It is a horrible practice. Aside from what you describe, such things also break paging through your site with the Page Up/Page Down keys or space bar, totally frustrating users who like to read this way (like me). Do you really want to frustrate your readers like this?
If you must - you absolutely must - have your logo or whatever visible on screen at all times or whatever, put it in a sidebar and have that float, or just some other place where it won't appear over your page's content. |
|
|
|
-2
|
|
|
#3 |
|
I must have the header, it is a requirement. Should I use frames then?
|
|
|
|
0
|
|
|
#4 |
|
Actually, Albright, that's not the correct answer. I do agree that it is annoying, but a lot clients do want these sorts of things nowadays and its good to know how to do it. Cmon, even Google uses it.
Thankfully it's not hard to do, and you definitely do not want to use iFrames ![]() Code:
.moveDown{
position: relative;
top: -150px;
}
Code:
.linkPosition{
position: absolute;
}
Code:
<div class="moveDown"><a name="aboutme" class="linkPosition"></div>
__________________
Design/Development Portfolio: Cetan.ca |
|
|
|
0
|
|
|
#5 | |
|
Quote:
thanks for the responses
|
||
|
|
0
|
|
|
#6 |
|
Hey, sorry I made a mistake in that code yesterday. I left out the closing tags for the link. Here is a live example:
http://www.cetan.ca/workshop/fixedheader.html Take a look at the source (and inline css at the top). Let me know if this works for you and if anyone finds a better way
__________________
Design/Development Portfolio: Cetan.ca |
|
|
|
1
|
|
|
#7 | ||
|
Quote:
Quote:
|
|||
|
|
0
|
|
|
#8 |
|
Well I don't think its wrong. It's definitely a choice. It seems I really hit a nerve on this with you, I just think its a better idea to help him instead of not because you think it's wrong, which begs the question why you even posted
__________________
Design/Development Portfolio: Cetan.ca |
|
|
|
1
|
|
|
#9 | |
|
Quote:
|
||
|
|
0
|
|
|
#10 | |
|
Quote:
|
||
|
|
0
|
|
|
#11 | |
|
Quote:
No matter if the banner floating thing is "right" or "wrong", don't forget that anchors (like your example above) are nothing more than links. The only difference from an outside link is the pound (#) in href which is just to says: stay on that page. So basically, you could use any HTML element (with or without CSS) to point your link to. ex: Code:
<a href="#here">click here</a> <div id="" name="here">It loads here</div> Code:
<a href="#here">click here</a> <p id="" name="here">It loads here</p> Code:
<a href="#here">click here</a> <img src="" id="" name="here"> Code:
<a href="#here">click here</a> <hr id="" name="here">
__________________
..:.::.:.:.::..:.: Oh, I get it. It's very clever :.:.::.:.:.::.:..:.::..:.::.:..:.::.:.::.:.::.. DO NOT OPERATE YOUR COMPUTER UNDER THE INFLUENCE! |
||
|
|
0
|
|
|
#12 | |
|
Quote:
Not a browser or software issue. No, not a coding issue either. Just a bad design issue. Won't somebody pelase think of the visitors! |
||
|
|
-2
|
|
|
#13 | |
|
Quote:
Facebook does still do it, just look at the top of the News Feed for starters. As a visitor, I rather like it - I find the quick links very handy and it saves me the trouble of scrolling all the way to the top of the page (especially if it has been a busy 'Facebook news' day and the page is long!) |
||
|
|
2
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 12:23 AM.








Linear Mode
