| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Great Scott!!
Join Date: Feb 2008
Posts: 223
|
elements not centering
whats wrong with this???? trying to get the content and logo to centre align HTML Code:
which is attatched too HTML Code:
|
|
|
|
|
|
#2 (permalink) |
|
Great Scott!!
Join Date: Feb 2008
Posts: 223
|
right, changed Code:
to ... Code:
and that made the content box centre, tried adding position: relative; to the #logo rule, but to no avail?? |
|
|
|
#4 (permalink) |
|
Senior Member
Join Date: Dec 2006
Location: Switzerland
Posts: 356
|
I would simply style the header div to center its content. then the divs within that, text-align left. ex. Code:
would remove those <p> elements, as they are neither closed or opened properly, which may be a cause for problems. |
|
|
|
#8 (permalink) | |
|
Senior Member
|
Quote:
margin: 0px auto; // Condense your two lines to one text-align:left; // Bring alignment back to left after everything's been centered |
|
|
|
|
#9 (permalink) |
|
Dizzy spell
Join Date: Feb 2005
Posts: 5,659
|
why do it different for Firefox and IE Tripper 44? - there's only VERY rare occasions for conditionals IMO - surely this aint one... To reiterate - body {text-align:center;} #yourcontainers {margin:0 auto; text-align:left;} |
|
![]() |