I have the following HTML and CSS code. It works fine in IE8 in one machine; but misaligns in second machine with IE8. What is to be changed in order to correct it?
Most of the time I see this, the user is slightly zoomed in (or out, but normally in) causing things to be slightly askew.
try to add this meta tag to your head:
<meta http-equiv="X-UA-Compatible" content="IE=edge">
That should prevent the compatibility mode in IE and force the standard mode.
try taking below and put it above <div id="logo">
<div id="signOut">
<a id="LoginStatus1">Logout</a>
</div>
Just change
<a>Helpdsk Services Admins Site</a>
to
<a style="float:left;" >Helpdsk Services Admins Site</a>
Works for me anyhow (I've had this issue before), one way the ie shows misallign, other way, it doesn't:
PS. If you prefer classes all the time, just make one for you <a> tag.
The IE has a button for Compatibility View, check if the both are checked. This button change the IE compatibility version.
You can set differents css for differents versions:
<link rel="stylesheet" type="text/css" href="css/chooser.css" />
<!--[if IE]> <link rel="stylesheet" type="text/css" href="css/chooser_ie.css" /> <![endif]-->
<!--[if IE 6]> <link rel="stylesheet" type="text/css" href="css/chooser_IE6.css" /> <![endif]-->