i had given margin left : properties in style sheet for a Div tag .. in mozilla i need to give 180 px to make it look align to center ... but in IE i need to change it to 30 Px .. so if one is correct .. another one look bad ...wht to do ???
Hello, nanda. As Astroman said, it is hard to tell without seeing. Could you post the style sheet, or at least the interesting part? In CSS many times the cause of a problem is not where one may think, but in another part of the sheet. The result also depends on your HTML: what things you assigned which classes, and so on. That is why without having the HTML page and the CSS sheet is difficult to say why is something happening. Cheers.
Give the div a specified width and use margin: 0 auto; on the div should work to centre it in all Display Monitors.
actually b4 i had given .. margin-left: 50px; ... and now i changed to margin: 0 auto; now it ok.. thr is only small difference ... but one thing i found is .. in IE if there is margin: 0 auto; or not .. div will be aligned to center .. and in firefox not ...
Margin auto doesn't always work properly in some versions of IE, so you have to get around it by making the div/element outside it have text-align:center, then put text-align:left for your centered div to counteract the previous command, unless you want the text centered of course..