Forum Moderators: not2easy

Message Too Old, No Replies

<div> moves with different screen sizes

         

kslnor

4:47 pm on Aug 29, 2006 (gmt 0)

10+ Year Member



I have tried using both absolute and relative positioning within a particular <div> tag, but the content of the tag always moves when viewed at a different screen size. I checked the code and the only positioning is the header - which is absolute. The linked stylesheets only style the fonts, etc...no positioning. Does anyone have any idea what I'm doing wrong?

Here is the page in question:

[norfolk-homes.com...]

Thank you.

JAB Creations

6:38 pm on Aug 29, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi kslnor,

With 54 posts you should be well aware by now that no one here is allowed to post links to any personal/business sites.

Regardless please post the code you are having difficulty with and we can help you out then.

- John

kslnor

6:59 pm on Aug 29, 2006 (gmt 0)

10+ Year Member



So sorry...Don't know what I was thinking.

Here's the code (which I inherited and trying to clean-up). Thank you.

<head>

</head>

<body bgcolor="001F3E" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="P7_Snap('AboutUsImg','AboutUsNav',0,12);

This is the header:

<div align="center"><img src="images/spacer.gif" width="100" height="7"></div>
<table width="779" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="1" height="1" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
<td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
<td width="1" height="1" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
<td valign="top">

Continues with 5 or so more header items...

<div id="AboutUsNav" style="position:absolute; left:134px; top:119px; width:150; height:100; z-index:10; visibility: hidden">

</div>

EXTRA CODE REMOVED

<div id="TRIGGER" style="position:absolute; left:-2px; top:-4px; width:600px; height:27px; z-index:4; visibility: hidden; border: 1px none #000000">
<a href="javascript:;" onMouseOver="doTrigger()"><img src="/images/spacer.gif" width="100%" height="100%" border="0"></a>
</div>

</table>
<img src="home.jpg" width="779" height="526" border="0" usemap="#Map"></td>
</tr>
</table></td>
<td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td width="1" height="1" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
<td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
<td width="1" height="1" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
<div align="center"><img src="images/spacer.gif" width="100" height="7"></div>

<DIV style="position:relative;top:-450px;left:490px;width:200px">
This is the container that will not stay put.
</DIV>

</body>

</html>

doodlebee

5:57 pm on Aug 30, 2006 (gmt 0)

10+ Year Member



Which div tag is moving? The only one I see is the whole content area, which centers itself when the screen size is changed. I don't see any other "moving divs".