Positioning in Netscape
by Paul.Anderson(at)atos.co.uk
|
| Date: |
Thu, 17 Aug 2000 16:06:21 +0100 |
| To: |
hwg-style(at)hwg.org |
| |
todo: View
Thread,
Original
|
|
I'm having a real problem getting a site working in both major browsers.
I've no examples up on the net at the moment, but the basic idea of the page
is that it's built around DIV's positioned on the page, then the contents of
those DIV's are loaded in at run time using JavaScript and external .js
files. This allows the client to alter the content of the site without
having to access the HTML, they simply upload a new .js to the server.
However while the following stylesheet/HTML combination works fine in IE4+:
External stylesheet:
#banner {
position : absolute;
background : transparent;
top : 10px;
left : 10px;
width : 700px;
height : 100px;
}
#navbar{
position: absolute;
background : transparent;
top: 110px;
left : 10px;
width: 700px;
height : 25px;
text-align: center;
font: xx-small "Comic Sans MS" sans-serif;
font-size: xx-small;
border-bottom : thin solid Black;
border-top : thin solid Black;
}
#new{
position : absolute;
background: Yellow;
top: 145px;
left : 10px;
width:160px;
height:190px;
text-align: center;
font: xx-small Verdana, sans-serif;
font-size: xx-small;
font-style: normal;
border-bottom : thin solid Black;
border-right : thin solid Black;
}
HTML:
<div id="banner">
<center>
<table summary="Banner Table">
<tr>
<td width="20%" align="center">Amazon Link</td>
<td align="center"><img src="banner2.gif" alt="Vandering
Header"></td>
<td width="20%" align="center"><a
href="http://www.andeavour.freeserve.co.uk"><img src="1asp142.gif" alt="This
page designed by Andeavour Web Design" border="0"></a></td>
</tr>
</table>
</center>
</div>
<div id="navbar">
<script type="text/javascript" src="links.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
i = 1;
document.writeln('<center><table><tr>');
while (links[i] != 'END') {
document.writeln('<td><a
href="'+links[i]+'"alt="');
i++;
document.writeln(links[i]+'">');
i++;
document.writeln(links[i]+'</a></td>');
i++;
}
document.writeln('</tr></table></center>');
//-->
</script>
</div>
<div id="new">
<script type="text/javascript" src="new.js"></script>
<script language="JavaScript" type="text/javascript"><!--
document.writeln('<br><a href="'+newstuff[1]+'"><img
src="'+newstuff[2]+'" alt="New Stuff" border="0"></a><br>');
document.writeln('<b>'+newstuff[3]+'</b><br>');
i=4;
while ( newstuff[i] != 'END' ){
document.writeln(newstuff[i]+'<br>');
i++;
}
//-->
</script>
</div>
It comes out as complete garbage in NN4+. The positionings are completely
haywire, and the background colour is only applied to the text rather than
the full area of the DIV.
Is this a "feature" with NN, or am I doing something relatively stupid?
Any help would be appreciated.
Thanks.
Paul Anderson
Senior Analyst
E-Mail: Paul.Anderson(at)Atos.co.uk
Phone: 01706 897254
Mobile: 07714 336001
**********************************************************************
This message is confidential. Its contents do not constitute a
commitment by Atos except where provided for in a written agreement
between you and Atos. Any unauthorised disclosure, use, or
dissemination, either whole or partial, is prohibited.
If you are not the intended recipient of the message, please notify
the sender immediately.
**********************************************************************
HWG hwg-style mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.