Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Div Tags out of position
Old 06-14-2009, 11:11 AM Div Tags out of position
Junior Talker

Posts: 1
Trades: 0
im making a site for school but my div tags are keep changing position, in IE and Firefox and other screen resolutions.... i need some help

this is the code

Quote:
<html>
<head>
<title>Home</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #000;
background-image: url(images/bakcground.png);
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
#apDiv1 {
position:absolute;
left:427px;
top:196px;
width:557px;
height:65px;
z-index:1;
}
body,td,th {
font-family: Verdana, Geneva, sans-serif;
font-size: 10px;
color: #FFF;
}
h1 {
color: #CCC;
font-size: 24px;
}
h2 {
font-size: 18px;
}
h3 {
font-size: 16px;
}
h4 {
font-size: 14px;
}
h5 {
font-size: 12px;
}
a:link {
color: #CCC;
}
#apDiv2 {
position:absolute;
left:137px;
top:305px;
width:499px;
height:213px;
z-index:2;
}
#apDiv3 {
position:absolute;
left:425px;
top:161px;
width:255px;
height:57px;
z-index:2;
}
#apDiv4 {
position:absolute;
left:197px;
top:340px;
width:433px;
height:152px;
z-index:3;
}
#apDiv5 {
position:absolute;
left:522px;
top:290px;
width:362px;
height:243px;
z-index:3;
}
-->
</style>
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
if (event == "init" && args.length > 2) {
if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
nbArr[nbArr.length] = img;
for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
} else if (event == "over") {
document.MM_nbOver = nbArr = new Array();
for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
nbArr[nbArr.length] = img;
}
} else if (event == "out" ) {
for (i=0; i < document.MM_nbOver.length; i++) {
img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
} else if (event == "down") {
nbArr = document[grpName];
if (nbArr)
for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
document[grpName] = nbArr = new Array();
for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
nbArr[nbArr.length] = img;
} }
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" onLoad="MM_preloadImages('buttons2/home2.png','buttons2/about2.png','buttons2/sneakers2.png','buttons2/tshirts2.png','buttons2/contact2.png')">
<!-- Save for Web Slices (layout2.psd) -->
<div id="apDiv1">
<p>Vandaag is de FootEdge website online! Kijk even rond op alle pagina's, wil je wat meer over ons weten kijk dan is op de about pagina, wil je weten hoe wij te werk gaan en welke sneakers wij aanbieden? klik maar gerust op de Sneakers pagina, wil je een customized T-Shirt, kijk dan op de T-Shirt pagina! Of wil je ons even bellen, e-mailen of ons bezoeken? dan moet je op de contact pagina zijn. <br>
</p>
<p>&nbsp;</p>
</div>
<div id="apDiv3"><h1>News</h1></div>
<div id="apDiv5"><img src="http://www.webmaster-talk.com/images/image-6.jpeg" width="304" height="228"></div>
<center><table id="Tabel_01" width="800" height="601" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" rowspan="2">
<img src="layout2_01.gif" width="184" height="148" alt=""></td>
<td><object id="FlashID" classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" width="411" height="109">
<param name="movie" value="banner.swf">
<param name="quality" value="high">
<param name="wmode" value="opaque">
<param name="swfversion" value="9.0.45.0">
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="Scripts/expressInstall.swf">
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="banner.swf" width="411" height="109">
<!--<![endif]-->
<param name="quality" value="high">
<param name="wmode" value="opaque">
<param name="swfversion" value="9.0.45.0">
<param name="expressinstall" value="Scripts/expressInstall.swf">
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object></td>
<td colspan="2" rowspan="2">
<img src="layout2_03.gif" width="205" height="148" alt=""></td>
</tr>
<tr>
<td><table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a href="Home.html" target="_top" onClick="MM_nbGroup('down','group1','home1','',1)" onMouseOver="MM_nbGroup('over','home1','buttons2/home2.png','',1)" onMouseOut="MM_nbGroup('out')"><img src="buttons2/home1.png" alt="" name="home1" width="82" height="39" border="0" onload=""></a></td>
<td><a href="About.html" target="_top" onClick="MM_nbGroup('down','group1','about1','',1) " onMouseOver="MM_nbGroup('over','about1','buttons2/about2.png','',1)" onMouseOut="MM_nbGroup('out')"><img src="buttons2/about1.png" alt="" name="about1" width="82" height="39" border="0" onload=""></a></td>
<td><a href="sneakers.html" target="_top" onClick="MM_nbGroup('down','group1','sneakers1','' ,1)" onMouseOver="MM_nbGroup('over','sneakers1','button s2/sneakers2.png','',1)" onMouseOut="MM_nbGroup('out')"><img src="buttons2/sneakers1.png" alt="" name="sneakers1" width="82" height="39" border="0" onload=""></a></td>
<td><a href="tshirts.html" target="_top" onClick="MM_nbGroup('down','group1','tshirts1','', 1)" onMouseOver="MM_nbGroup('over','tshirts1','buttons 2/tshirts2.png','',1)" onMouseOut="MM_nbGroup('out')"><img src="buttons2/tshirts1.png" alt="" name="tshirts1" width="82" height="39" border="0" onload=""></a></td>
<td><a href="Contact.html" target="_top" onClick="MM_nbGroup('down','group1','contact1','', 1)" onMouseOver="MM_nbGroup('over','contact1','buttons 2/contact2.png','',1)" onMouseOut="MM_nbGroup('out')"><img src="buttons2/contact1.png" alt="" name="contact1" width="82" height="39" border="0" onload=""></a></td>
</tr>
</table></td>
</tr>
<tr>
<td rowspan="2">
<img src="layout2_05.gif" width="97" height="452" alt=""></td>
<td colspan="3">
<img src="06.jpg" width="587" height="414" alt=""></td>
<td rowspan="2">
<img src="layout2_07.gif" width="116" height="452" alt=""></td>
</tr>
<tr>
<td colspan="3">
<img src="layout2_08.gif" width="587" height="38" alt=""></td>
</tr>
<tr>
<td>
<img src="spacer.gif" width="97" height="1" alt=""></td>
<td>
<img src="spacer.gif" width="87" height="1" alt=""></td>
<td>
<img src="spacer.gif" width="411" height="1" alt=""></td>
<td>
<img src="spacer.gif" width="89" height="1" alt=""></td>
<td>
<img src="spacer.gif" width="116" height="1" alt=""></td>
</tr>
</table></center>
<!-- End Save for Web Slices -->
<script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
</script>
</body>
</html>
cham is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-14-2009, 07:31 PM Re: Div Tags out of position
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Wow.. that's some ugly DW code!

#1 - get RID of all that absolute positioning - you do NOT need it and it WILL cause you problems. Learn to use the normal document flow and floats to put things where you want them.

#2 - Dump the tables for layout and use CSS for layout
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 06-14-2009, 10:26 PM Re: Div Tags out of position
TripleMoons's Avatar
Webmaster Talker

Posts: 614
Name: Stephanie Kunder
Location: Hanover, PA
Trades: 0
and please put CSS in a separate file!
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

TripleMoons is offline
Reply With Quote
View Public Profile Visit TripleMoons's homepage!
 
Reply     « Reply to Div Tags out of position
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16056 seconds with 12 queries