Page 1 of 1

Firefox -> rel pos text-align

Posted: Sat Jun 24, 2006 3:31 pm
by seodevhead
I made a #header div box and placed an <h1> inside this div and I want to relatively position it "semi-outside" the bottom of #header and have it centered. Unfortunately, it works great in IE6 but does not center-align the h1 in firefox. Any idea why it is not center-aligning the h1 in FF? Thanks.

#Header {
width: 583px;
text-align: center;
padding-top: 60px;
height: 40px;
border: 1px solid #000;
}

#Header h1 {
position: relative;
width: 480px;
padding: 5px;
border: 1px solid #000;
text-align: center;
}

Any help would greatly be appreciated! Thanks!

Posted: Sun Jun 25, 2006 2:47 am
by matthijs

Code: Select all

#Header {
width: 583px;
text-align: center;
padding-top: 60px;
height: 40px;
border: 1px solid #000;
}

#Header h1 {
position: relative;
width: 480px;
margin:0 auto;
padding: 5px;
border: 1px solid #000;
text-align: center;
}
Add margin:0 auto; to the h1