Align
Dette .css klæber h.h.v. top og fod til over og underkant af browserens vindue. Ikke helt nemt har det været, at få det til at virke.Problemet er så nu, at top og fod ikke lader sig centrere og hvordan gøres det?
(Jeg ved der er overflødig kode i .cssen)
body {
background-color: #3366FF;
vertical-align: bottom;
text-align:center
height:100%;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
}
#side {
text-align:center
position:absolute;
width:800px;
height:100%;
margin-top:0px;
margin-bottom:0px;
margin-left:auto;
margin-right:auto;
color:#FFFFFF;
background:#00UU00;
text-align:center;
}
#topbar {
position:absolute;
top:0px;
right:0px;
left:0px;
height:40px;
width:800px;
text-align: center;
width:800px;
background:#000000;
}
#footer {
position: absolute;
bottom: 0px;
right:0px;
left:0px;
height: 40px;
width: 800px;
text-align: center;
background:#000000;
}
#spalte1{
float:left;
width: 33%;
margin-top:130px;
border: 1px solid black;
background: white;
}
#spalte2{
float:left;
width: 33%;
margin-top:130px;
border: 1px solid black;
background: white;
}
#spalte3{
float:left;
width: 33%;
margin-top:130px;
border: 1px solid black;
background: white;
}
p {
color:#99FFFF;
}
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="da">
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="style2.css">
</head>
<body>
<div id="side">
<div id="topbar"><p>test top</p></div>
<div id="spalte1">
<p>spalte1</p>
</div>
<div id="spalte2">
<p>spalte2</p>
</div>
<div id="spalte3">
<p>spalte3</p>
</div>
<div id="footer"><p>test footer</p></div>
</div>
</body>
</html>
