Asp.net site diplays differently on coworkers computer
I have an asp.net site that displays the way I want it to on my computer in IE8 and firefox. On my co-worker's computer the page content gets pushed down below the left side menu.
We both have the exact same version of IE8.
I'm using divs and css for positioning and a Masterpage.
body
{
background-position: center center;
font-family: Verdana;
font-size: medium;
background-color: #000000;
}
* {
padding: 0;
margin: 0;
}
#dateField{}
#head
{
color: #00FF00;
}
#topContent
{
background开发者_如何学运维-position: url(Images/bg2.gif) repeat-x;
text-align: center;
background: url(Images/bg2.gif) repeat-x;
color: #FFFFFF;
font-size: x-large;
text-decoration: none;
font-weight: bold;
height: 87px;
vertical-align: middle;
line-height: 87px;
}
#topContent span {vertical-align:middle}
#leftContent
{
background-position: #0094D6 url(Images/contentbg.gif) repeat-x;
width: 170px; /*background: #0094D6 url(Images/contentbg.gif) repeat-x;*/
padding: 10px;
font-size: 90%;
text-align: left;
position: static;
margin-top: 10px;
margin-bottom: 10px;
left: 0px;
float: left;
height: 574px;
}
#SideTableFiller
{
height: 262px;
background-color: #000000;
}
#mainContent
{
text-align: left;
margin-left: 190px;
padding: 2px;
color: #FFFFFF;
}
#footerContent
{
background: url(Images/footer.jpg) repeat-x;
height: 100px;
clear: left;
}
Does one of you have the compatibility button pressed in IE?
Are you running it from "localhost" and s/he is running it as a site on the "intRAnet".
In IE8, intRAnets are rendered in NON-IE8 Standards mode by DEFAULT, but Localhost and IntERnet sites are run in IE8 Standards mode by DEFAULT.
Paste this into your/their addressbar to see what mode you are actually in:
javascript:var%20vMode=document.documentMode;var%20rMode='IE5%20Quirks%20Mode';if(vMode==8){rMode='IE8%20Standards%20Mode';}else%20if(vMode==7){rMode='IE7%20Strict%20Mode';}alert('Rendering%20in:%20'+rMode);
You'll get 1 of 3 values: [IE5 Quirks Mode | IE7 Strict Mode | IE8 Standards Mode]
and of course each renders slightly different... and JavaScript behaves differently ;-)
Since you are using float: left
in your CSS, I assume that the page contents (sidemenu + mainContent) do not fit next to each other in your coworker's browser window, and are therefore pushed below the sidemenu.
Maybe your coworker is using a different screen resolution, or he has a zoom level greater than 100% in IE.
isnt your IE8 compability mode enabled? try disabling it;
if the users visited your site before, they may be with browser cache, try Ctrl+F5 on their browser with your site open to refresh cache
One possibility is that the other person may have a different zoom level applied.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
as the first line on the page should force IE8 Standards Mode regardless of where the page is being viewed.
精彩评论