jo*********@topscene.com wrote:
Make Firefox Center Content in a div Or td Tag By Using CSS?
Does anyone know how to do this. IE works great with text-align:center;
but Firefox just always left-aligns...
If you'd use a valid doctype, IE6 wouldn't do it either.
text-align:center only works on inline content.
To center block-level elements, you need to set the left and right
margin to identical values.
For instance:
<div class="outer">
<div class="inner">
some content
</div>
</div>
To center div.inner inside div.outer, you can use:
div.inner{width:[some value];margin:auto;}
or
div.inner{width:auto;margin:[some value];}
(Note: width:auto; is superfluous on a div, unless you've set a width
on divs earlier in the stylesheet, which you need to 'undo' by setting
it to the default 'auto'.)
--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: D.A.D. - Bad Craziness