Nyt CSS Spørgsmål om "element"-placering.
Har fået lidt styr på min opsætning nu, men jeg har et element, der ikke vil placere sig, hvor jeg vil have det.Det er elementet "sidenewsright", der i og for sig ligger rigtigt når man har maksimeret vindue i opl. 1024x768, men laver ballade så snart jeg laver om på vindue eller opl.
Kan ses på http://dwr.dk
Koden ser således ud:
CSS:
#container {
position:absolute;
margin-left:-300;
margin-right:auto;
margin-top:10px;
left: 50%;
width:600px;
height:90%;
background-color:white;
border:1px solid white;
overflow: visible;
}
#banner {
position:relative;
margin-left:auto;
margin-right:auto;
width: 100%;
top: 10px;
height: 100px;
background-color: beige;
border: 1px solid olive;
}
#topleftmenu {
position:relative;
margin-left:auto;
margin-right:auto;
margin-top:15px;
width: 250px;
height: 50px;
background-color: beige;
border: 1px solid olive;
}
#toprightmenu {
position:relative;
margin-left:255px;
margin-right:auto;
margin-top:-50px;
width: 225px;
height: 50px;
background-color: beige;
border: 1px solid olive;
text-align: right;
text-align-top: center;
}
#maintable {
position:relative;
margin-left:auto;
margin-right:auto;
margin-top:5px;
width: 480px;
height: 100%;
background-color: beige;
border: 1px solid olive;
padding: 5px;
}
#sidenewsright {
position: relative;
margin-left: 485px;
margin-right: auto;
margin-top: -762px;
width: 113px;
height: 100%;
background-color: beige;
border: 1px solid olive;
}
HTML:
<?PHP
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Sandbox</title>
<link rel="stylesheet" type="text/css" href="build.css"></link>
</head>
<body>
<div id="container">
<?PHP
include "txt/banner.php";
include "txt/topleftmenu.php";
include "txt/toprightmenu.php";
include "txt/maintable.php";
include "txt/sidenewsright.php";
?>
</div>
</body>
</html>
