Hi,
What commands of css are not working in IE? And how we can change them?
My webpage is floated: center, but in IE it still appears in left... Firefox and Opera shows it without any problems.
Hi,
What commands of css are not working in IE? And how we can change them?
My webpage is floated: center, but in IE it still appears in left... Firefox and Opera shows it without any problems.
The reason may be that there is no float: center; It's either left or right. If you want to center your page in the middle of the browser use this:
body {
margin: auto;
padding: 0;
}
Then a wrapper div :
#wrapper {
width: 900px;
margin: auto;
padding: 0;
}
auriaks (02-25-2010)
An d why do I need wrapper?![]()
works great![]()
I think you just answered your own question of why...
But, to further that, a wrapper is just a convenient way to apply centering to one element instead of all your elements. Plus, it's an easier way to make it cross-browser compatible. However, for older versions of IE (notably IE6) the old method was to 'trick' IE into centering your page by using:
body {
text-align: center;
}
#wrapper {
text-align: left;
}
Which centered the wrapper but within the wrapper the text would align left as normal.
thanks for info.![]()
Bookmarks