2012-10-30 20:08, Philip TAYLOR wrote:
When an HTML link references an on-page fragment that is near the
bottom of the page, the browser (when the link is followed) will
display that page fragment as close to the top of the page as it
can subject to the more important constraint that the last line
of the page content will not be higher than the bottom of the browser
window. Is there any "Magic CSS" that can be applied (?to the final
element of the page?) that would allow the on-page fragment to rise
to the top of the browser window when required yet not generate
vertical scroll bars other than those mandated bo other aspects of
the page's dimensions ?
I'm afraid there isn't. I can't see how we could position the page as a
whole that way, even though we could position the element that the
fragment refers to.
But to address the basic problem of recognizing what the link really
took the user to, you can do some styling on the :target pseudo-class, e.g.
:target {
background: #ffd;
color: black;
border: dotted 1px;
}
Then it suddenly becomes important how the link destination has been
marked up, as this code highlight the specific element that has the
corresponding id attribute (or the matching <a name=...>...</a> element,
id that old-style markup was used).
Yucca
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/