nevets2001uk
IS-IT--Management
Hi.
I've been building a ASP.NET site for a while now and have got it working perfectly. It's designed to use CSS for the layout.
Until now I've forgotten to think about other browser (I'm used to internal apps with a signle browser specification). It displays fine on IE but comlpetely wrong in Netscape and Firefox.
I tried re-doing a section of code to see how it displayed in both, but I still have display problems. I can't really see from the code what I should change to make it work in both browsers. Below is an except of the .aspx page and the css file.
Can anyone explain how I should modify this to get it display the same in both browsers. I can then try to get the rest of the page to work as well.
Thanks in advance for any advice you can give me.
Steve G (MCP)
I've been building a ASP.NET site for a while now and have got it working perfectly. It's designed to use CSS for the layout.
Until now I've forgotten to think about other browser (I'm used to internal apps with a signle browser specification). It displays fine on IE but comlpetely wrong in Netscape and Firefox.
I tried re-doing a section of code to see how it displayed in both, but I still have display problems. I can't really see from the code what I should change to make it work in both browsers. Below is an except of the .aspx page and the css file.
Can anyone explain how I should modify this to get it display the same in both browsers. I can then try to get the rest of the page to work as well.
Thanks in advance for any advice you can give me.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Page Title</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="[URL unfurl="true"]http://schemas.microsoft.com/intellisense/ie5"[/URL] name="vs_targetSchema">
<link href="css/appearance.css" type="text/css" rel="stylesheet">
</head>
<body class="page">
<form id="Form1" method="post" runat="server">
<div class="main">
<div class="header">
<img alt="Logo" src="sjg/images/general/logo_c.gif">
</div>
<div class="variableimage">
<img alt="Random Image Header" src="sjg/images/headers/image1-2.jpg">
</div>
<div class="menubar">
<span class="item">HOME</span>
<span class="item"><a href="about/index.aspx">ABOUT</a></span>
<span class="item"><a href="blog/index.aspx">BLOG</a></span>
<span class="item"><a href="gallery/index.aspx">GALLERY</a></span>
<span class="item"><a href="motorsport/index.aspx">MOTORSPORT</a></span>
</div>
</div>
</form>
</body>
</html>
Code:
.page {
background : #777777;
font-family : Arial;
font-size : 12px;
}
a:link {color : #26559B; text-decoration : none;}
a:visited {color : #26559B; text-decoration : none;}
a:hover {color : #000000; text-decoration : none;}
/* MAIN PAGE AREA */
/* This is the div in which all page elements will sit and includes the white background area */
.main {
position: absolute;
width : 900px;
left: 50%;
margin-left: -450px;
margin-top : 35px;
margin-bottom : 35px;
background : #FFFFFF;
border : 1px solid #000000;
}
.header {
width : 100%;
background : #000000;
padding-top : 15px;
padding-left : 15px;
padding-bottom : 12px;
}
.menubar {
width : 100%;
height : 31px;
background : #979797;
padding-top : 7px;
font : 13px Arial;
font-weight : bold;
color : #FFFFFF;
border-bottom : 1px solid #000000;
border-top : 1px solid #000000;
}
.menubar span.item {padding-left : 15px;}
.menubar a:link {color : #000000;}
.menubar a:visited {color : #000000;}
.menubar a:hover {color : #DDDDDD;}
Steve G (MCP)