Previous Message
Next Message

<a href=page.html#target> placement question

Sent by Clinton Pidlubny on 14 July 2004 20:08


My thought would be to:

h2#important_stuf {margin-top:20px;}
or
#important_stuf {margin-top:20px;}
if you don't always want it attributed to the h2 tag.

This way only that ID uses the spacing.
Hope this helps.
Clint

>>> Marco Scoffier [EMAIL-REMOVED]> 7/14/2004 2:28:59 PM >>>
Hello all, this is my first post to this list.

I checked the archives searching for anchor and target, and
couldn't
find a solution, so I thought one of you might have a thought.

When I click on a link with a #target to refer to a part of a page,
I
always get the referred tag at the very top of the page.  Is there
a way
to get the linked to content placed a certain distance from the top
of
the page?  

say I have a <h2 id="important_stuf">Read this</h2>

and a link <a href="#important_stuf">Read that</a> elsewhere on
the
page.  I want the <h2> kind of in the middle of the page, rather
than
jammed at the top.  I tried faking with an artificially large
padding-top, but would prefer a less restrictive solution that
doesn't
add a bunch of white space to all my pages.

Thanks for any leads,

-- 
Marco
______________________________________________________________________
css-discuss [EMAIL-REMOVED]] 
http://www.css-discuss.org/mailman/listinfo/css-d 
List wiki/FAQ -- http://css-discuss.incutio.com/ 
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Possibly related: