![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Nevermind, I just found a workaround myself. I removed the text-align:center; from the encapsulating div and gave that property to all the inner divs. It seems that IE not only centers text, but also other elements (in casu: divs) when using text-align. Too bad, because now my code is bloated thanks to IE... |
#4
| |||
| |||
|
|
TomB wrote: Nevermind, I just found a workaround myself. I removed the text-align:center; from the encapsulating div and gave that property to all the inner divs. It seems that IE not only centers text, but also other elements (in casu: divs) when using text-align. Too bad, because now my code is bloated thanks to IE... Isn't that correct behavior though? According to my O REILLY CSS Pocket Reference, 2nd Ed, on page 93, for text-align, "Applies to:" lists "Block-level elements", and DIVs are by default block-level so it makes sense. So if the outer div uses text-align: center; any block level element should be centered, so it seems IE does that more correctly in this reguard. Please correct me if I'm wrong though |
#5
| ||||
| ||||
|
|
Stan R. schreef: TomB wrote: Nevermind, I just found a workaround myself. I removed the text-align:center; from the encapsulating div and gave that property to all the inner divs. It seems that IE not only centers text, but also other elements (in casu: divs) when using text-align. Too bad, because now my code is bloated thanks to IE... Isn't that correct behavior though? |
|
According to my O REILLY CSS Pocket Reference, 2nd Ed, on page 93, for text-align, "Applies to:" lists "Block-level elements", and DIVs are by default block-level so it makes sense. So if the outer div uses text-align: center; any block level element should be centered, |
|
so it seems IE does that more correctly in this reguard. Please correct me if I'm wrong though |
|
You have got a point there, although out of some kind of "gut feeling" I expected that the position of divs wouldn't be affected by text-align... But yes, IE seems te be doing the correct thing here. Blimey! |
![]() |
| Thread Tools | |
| Display Modes | |
| |