PDA

View Full Version : Absolute Position Inside A Div


ubik
03-17-2006, 04:11 AM
Hello,

I have a custom H1 defined.. and i have it inside the header, when i view it in the browser it lies at the very top of the header.. without using margins because i want to use a serif and sizes vary in different browsers.. I was thinking of using

position:absolute; bottom:0px;

But the H1 then gets positioned to the bottom of the document and breaks out of the header, I think i remember reading that you could make elements inline and absolute position them relative to the container in which they were in? I tried on the #header & also on the h1

display:block;
display:inline;
&
display:table-cell;

but i forgot how to do this? Can anyone help?

punjabi_munda
03-17-2006, 04:26 AM
position:absolute; bottom:0px; top:0px;

using this u r code u solve your problem
:)

Kravvitz
03-17-2006, 05:28 AM
I don't think display:inline will affect that.

Read these:
http://www.stopdesign.com/articles/absolute/
http://www.autisticcuckoo.net/archive.php?id=2004/12/07/relatively-absolute

ubik
03-17-2006, 05:42 AM
yes thank you, I forgot about using position:relative for the parent DIV. :thumbsup:

fyo
03-17-2006, 12:30 PM
using this u r code u solve your problem
:)

My head hurts.