Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- centering a div inside of a div in FireFox
May 24, 2005, 6:02 pm
rate this thread
I'm struggling to redesign this site so that it is "stretchy".
Previously everything was fixed-width and absolutely positioned. I was
hoping to get the text at top to center inside the top banner. This
works in IE on a PC, but not in FireFox. Any tips?
Re: centering a div inside of a div in FireFox
Once upon a time *email@example.com* wrote:
<div> is block level element, text is inline content. Add
"margin-left:auto;" and "margin-right:auto;" to the block level
element and it will center the <div>.
"text-align:center;" centers only the inline content (sutch as text).
IE has bugs that often treats block level as inline for centring.
Top posters will be ignored. Quote the part you
are replying to, no more and no less! And don't
quote signatures, thank you.
- » What happens if several text fields have the same name?
- — Previous thread in » HTML Authoring Forum