April 16th, 2003, 08:24 AM
Defining centered "non-text" elements (CSS)
i'm trying to define (for instance a table) to be centered on a page.
I couldn't find a possibility to do so. The only thing i could center was text. But as soon as it comes to centering something else than text it wouldn't work.
Of course I know that I could easely Center anything with the HTML Tag <center> but I am trying to define everything with css.
Does anyone have an idea how I can really center things other than text?
thx for replies, syndrome
April 16th, 2003, 08:39 AM
in the <body>
April 16th, 2003, 08:43 AM
text-align(only text ?)
Yup, I have already tested the "text-align" option.
But as I see it this realy ONLY aligns my text and ignores other elements as especially tables.
I want to have my table centered and this does not happen using text-align : center.
Or am I wrong there and my browser loves its cache ?
April 16th, 2003, 08:57 AM
<a href ="chillpadiscool.com">chillpad is cool</a>
April 16th, 2003, 09:02 AM
<center>...nope...not what I want
Sorry, but as I already mentioned in my original text I don't want to use an HTML tag. Especially not <center>. That is because the <center>-tag is what w3c wants to quit being used. They rather want css to be used for everything concering layout. Thats why i'm wondering about how to center stuff without the <center> Tag.
ps: <A Href...> is in my opinion a text-element which should be centable useing text-align. I want to center thins as tables: <table><tr><td>content</td></tr></table>
April 16th, 2003, 09:38 AM
April 16th, 2003, 11:47 AM
Thanks, thats what I needed.
Though the solution seems quite strange to me.
I can't really follow how this is to center and why CSS doesn't have a more simple solution as may alignment:center.
I thought I had read about the alignment operator in CSS but it didn't work anyway.