Northie wrote:
Ryan_steyn wrote:
Heck, you can't even center something with CSS. What kind of retard organization screws that up?!?!?!
ROTFLMAO
And now my day is complete, thanks for that stitchCode: html
<div style='text-align:center;'>
<div style='text-align:-moz-center;'>
</div>
</div>
Doesn't that center the text only? What if I want the 300px div centered?
Member
From: South Africa
Registered: 2006-07-21
Posts: 294
I've been thanked 7 times.
Offline
First there was...
Code:
<center></center>
Then there was...
Code:
<div align="center"></div>
Now there is...
Code:
<div style="text-align:center; text-align:-moz-center;">
And this is clever evolution whereby we use "less" code?
Member
From: South Africa
Registered: 2006-07-21
Posts: 294
I've been thanked 7 times.
Offline
MrStitch wrote:
Doesn't that center the text only? What if I want the 300px div centered?
In order to center the whole page...
Code:
<style>
body{
text-align: center; /* centered in IE */
text-align: -moz-center; /* centered in FF */
}
</style>
to an individual div, you must have another div around that, for example
Code:
<div style="text-align: center; text-align: -moz-center;">
<div style="width: 300px;">
now this is the div that gets centered, not the container div
</div>
</div>
Quite a round about route if you ask me
Last edited by Roxane (2007-02-27 02:58:43)Moderator
From: Yorkshire, UK
Registered: 2006-08-19
Posts: 2860
I've been thanked 85 times.
Offline
but the text inside that 300px div will inherit the text-align:center properties, so....
Code: html
<div style="text-align: center; text-align: -moz-center;">
<div style="width: 300px; text-align:left;">
now this is the div that gets centered, not the container div
</div>
</div>
or
Code: html
<div style="text-align: center; text-align: -moz-center;">
<div style="width: 300px; text-align:left;">
<div style='text-align:left;'>
now this is the div that gets centered, not the container div
</div>
</div>
</div>
<center>So it looks like there is a way... to bad it takes 4 days to write the code</center>
Member
From: Pell City, Alabama USA
Registered: 2004-11-17
Posts: 2084
I've been thanked 5 times.
Offline
Roxane - you should read this
http://www.positioniseverything.net/exp … ndent.html
TombOfTheMutilated.NET - Destroying The Minds of America's Youth Since 2001
Member
From: South Africa
Registered: 2006-07-21
Posts: 294
I've been thanked 7 times.
Offline
Mutilated1 wrote:
Roxane - you should read this
http://www.positioniseverything.net/exp … ndent.html
Just looked at it briefly...looks quite useful, I'll definately read it. Thanks!
| Never |

ROTFLMAO

