Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

overlapping DIV tags 2

Status
Not open for further replies.

blues77

Programmer
Jun 11, 2002
230
CA
Is there anyway to prevent div tags from over lapping? I have been using div tags to position items on my page but when i go down to a lower resolution they start to overlap.
Any help is greatly appreciated!

thanks
mike
 
How are they overlapping? Are you using absolute top and bottom positioning?
 
I'm using absolute positioning and the top property to position the elements on the screen.

mike
 
I'm using absolute positioning and the top property to position the elements on the screen. they only start to over-lap when i resize the window.

mike
 
Show us the complete (html + css) code.

Erik <!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
this is the entire html code. I appologize if it's difficult to read. I actually just modified the page so that everything is positioned using tables and it seems to work fine.

<html>
<head>
<title>Topographic Maps</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
<link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;mapStoreStyles.css&quot;>

<script src=&quot;./javaScript/mapStoreScript.js&quot; language=&quot;javascript&quot; type=&quot;text/javascript&quot;>
</script>
<script language=&quot;javascript&quot; type=&quot;text/javascript&quot;>
entireMap50 = new Image
detailMap50 = new Image

entireMap250 = new Image
detailMap250 = new Image

entireMap50.src = &quot;../assets/mapPics/topographic(50).jpg&quot;
detailMap50.src = &quot;../assets/mapPics/topographic(50)detail.jpg&quot;

entireMap250.src = &quot;../assets/mapPics/topographic(250).jpg&quot;
detailMap250.src = &quot;../assets/mapPics/topographic(250)detail.jpg&quot;

</script>

</head>

<body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot;>

<div style=&quot;position:absolute; border:medium outset black; left:10px; width:95%; background-color: #336699; layer-background-color: #336699; color:#C5DAF1&quot; >
<div align=&quot;center&quot;><font face=&quot;Arial, Helvetica, sans-serif&quot; size=&quot;7&quot;><b>National Topographic System of Canada</b></font></div>
</div>

<br>
<br>
<br>
<br>
<br>

<div style=&quot;border:thin solid black; position:absolute; left:10px; width:95%&quot;>
<br>&nbsp;A topographic map is a detailed and accurate graphic representation of cultural
and natural features on the ground. They are available in &nbsp;two standard scales,
1:50 000 and 1:250 000. The area covered by a given map sheet is determined
by its latitude and longitude. &nbsp;Because of the &nbsp;standard NTS numbering system,
knowing the map number allows you to quickly identify adjacent maps.
<a href=&quot;topoBasics.html&quot;><img align=&quot;absmiddle&quot; border=&quot;0&quot; src=&quot;../assets/clickForMore.jpg&quot;></a><br><br>
</div>

<br>





<!--main div tag to hold page contents-->
<div style=&quot;position:absolute; left:10px; width:95%; height:20%px; top:40%&quot;>
<b><i>Roll your mouse over the map photos to see a more detailed view</i><b>

<br>
<br>

<table>
<tr>

<td align=&quot;right&quot; width=&quot;32%&quot;> <img src=&quot;../assets/mapPics/topographic(50).jpg&quot; name=&quot;topo50&quot; onMouseover=&quot;document.topo50.src=detailMap50.src&quot; onMouseout=&quot;document.topo50.src=entireMap50.src&quot;>
</td>

<td align=&quot;left&quot; valign=&quot;top&quot; width=&quot;44%&quot;> <b>1:50,000 sample</b> <br>
<br>
The 1:250,000 scale maps are divided into sixteen segments<br> (1 to 16) forming blocks used for 1:50,000 scale mapping.
<br>
<br>
<br>
<br>
</td>

<td valign=&quot;top&quot; align=&quot;center&quot; width=&quot;24%&quot; >
<div onMouseover=&quot;displayMenu('NTS1')&quot; onMouseout=&quot;hideMenu('NTS1')&quot;>
<img src=&quot;../assets/viewIndex.jpg&quot;>
</div>
<div id=&quot;NTS1&quot; style=&quot;visibility:hidden; border:thin solid black&quot; onMouseover=&quot;displayMenu('NTS1')&quot; onMouseout=&quot;hideMenu('NTS1')&quot;>
<b>&nbsp;Nova Scotia<br>
&nbsp;New Brunswick<br>
&nbsp;PEI<br>
&nbsp;NewfoundLand<br>
&nbsp;Labrador</b> </div>


</td>
</tr>

<tr>

<td align=&quot;right&quot; width=&quot;32%&quot;><img src=&quot;../assets/mapPics/topographic(250).jpg&quot; name=&quot;topo250&quot; onMouseover=&quot;document.topo250.src=detailMap250.src&quot; onMouseout=&quot;document.topo250.src=entireMap250.src&quot;></td>

<td align=&quot;left&quot; valign=&quot;top&quot; width=&quot;44%&quot;>
<p><b>1:250,000 sample</b> <br>
<br>
The 1:250 000 scale maps are identified by a combination of numbers
and letters, A through P (e.g. 11D). <br>
<br>
</p>
</td>

<td valign=&quot;top&quot; align=&quot;center&quot; width=&quot;24%&quot; >
<div onMouseover=&quot;displayMenu('NTS2')&quot; onMouseout=&quot;hideMenu('NTS2')&quot;> <img src=&quot;../assets/viewIndex.jpg&quot;></div>

<div id=&quot;NTS2&quot; style=&quot;visibility:hidden; border:thin solid black&quot; onMouseover=&quot;displayMenu('NTS2')&quot; onMouseout=&quot;hideMenu('NTS2')&quot;>

<b>&nbsp;Nova Scotia<br>
&nbsp;New Brunswick<br>
&nbsp;PEI<br>
&nbsp;NewfoundLand </b><br>
<b>&nbsp;Labrador</b>
</div>


</td>
</tr>


</table>



<pre>&nbsp;


</pre>


</b></b></div>
<p><b><b> <br>
<br>
</b></b></p>

<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>
 
design your page in or for 800*600 res, this is really the lowest res you should support. Once you design for this res you wont get the overlapping problem with higher res screens
 
Hi Blues77,

The settings of width, top, height in % causes the problem

With the red changes I made in the div settings it should work fine. (as sjravee said when you desigh for 800*600 you won't get any peoblem. A lot of (professional) sites design for 800*600 and have a blank area at the right (or the center the page and have left and right blank area)

The green adds are because I like that more :)

<div style=&quot;position:absolute; border:medium outset black; left:10px; width:750; background-color: #336699; layer-background-color: #336699; color:#C5DAF1&quot;>

<div style=&quot;border:thin solid black; position:absolute; left:10px; width:750; top:70; padding-left:8px; padding-right:8px;&quot;>

<div align=&quot;center&quot;><font face=&quot;Arial, Helvetica, sans-serif&quot; size=&quot;6&quot;><b>National Topographic System of Canada</b></font></div>

<div style=&quot;border:thin solid black; position:absolute; left:10px; width:750; top:70&quot;>

---------------------------------------------------------
BTW: why not code your style in a style sheet or inline style and give the div's a classname:

<style>
.div1 {
position:absolute;
border:medium outset black;
left:10px;
width:750;
background-color: #336699;
layer-background-color: #336699;
color:#C5DAF1
}

.div2 {
border:thin solid black;
position:absolute;
left:10px;
width:750;
top:70;
padding-left:8px;
padding-right:8px;
}
</style>

<div class=div1&quot;></div>
<div class=div2&quot;></div>

Hope this helps,
Erik <!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
Hi Blues77,

oops, I made some mistakes.
These should be the right changes:

<div style=&quot;position:absolute; border:medium outset black; left:10px; width:750; background-color: #336699; layer-background-color: #336699; color:#C5DAF1&quot;>

<div align=&quot;center&quot;><font face=&quot;Arial, Helvetica, sans-serif&quot; size=&quot;6&quot;><b>National Topographic System of Canada</b></font></div>

<br>
<br>
<br>
<br>
<br>

<div style=&quot;border:thin solid black; position:absolute; left:10px; width:750; top:70; padding-left:8px; padding-right:8px;&quot;>

<!--main div tag to hold page contents-->
<div style=&quot;position:absolute; left:10px; width:750; top:200&quot;>


Hope this helps,
Erik <!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top