|
Posted by Curtis on 11/19/67 11:34
Els <els.aNOSPAM@tiscali.nl> wrote in message
news:6rmvfeiae7bi$.dlg@locusmeus.com...
> >>> Any reason why we shouldn't stick with this syntax?
> >>
> >> Nope. Margins are the correct way to centre a
block-level element.
> >> You can abbreviate your example like this:
> >>
> >> <table style="margin:0 15%;width:70%"> The following
should also
> >> be equivalent:
> >
> > I'm afraid you lost me, Toby. You said no, then said
margins
> > were the correct way.
>
> You asked a negative: 'any reason why we *shoudn't* ...'.
Oops. Sure. Sorry I read that so hastily.
> > Margin auto works great for Firefox and Opera, but fails
for
> > IE 5--I haven't tested on 6 yet, but no matter. If it
fails
> > on 5, we won't use it.
>
> I use both.
> <div>
> <table>....</table>
> </div>
>
> div{text-align:center;}
> table{margin-auto;width:15em;text-align:left;}
>
> Works cross-browser.
IIRC, that's the approach taken in the link I cited.
It wouldn't work for us, though, because we're using this
CSS in a macro line we're feeding to a single element like a
table in our markup language. IOW, it needs to be a single
phrase which would normally be between { something;
something; something } on a CSS.
Many thanks to both you and Toby for the feedback!
--
Curtis
Visit We the Thinking
www.wethethinking.com
An online magazine/forum
devoted to philosophical
thought.
Navigation:
[Reply to this message]
|