Har ændret doc-typen, men kan ikke rigtig ændre body-tagget (eller har ihvertfald ikke fundet ud af en anden måde at gøre det på). Text-align tagget i body gør at siden er centreret, uafhængig af skærmopløsning.
Under alle omstændigheder virkede det ikke rigtigt... Hele koden er:
<html>
<head>
<title>Untitled</title>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd"><style>
body {
margin:0px 0px; padding:0px;
text-align:center;
background-color:#FFFFFF;
}
#toplayer {
position:absolute;
top:0px;
left:0px;
width:100%;
height:90px;
background-color:#FFFFFF;
}
.toplogo {
position:absolute;
top:0px;
left:0px;
height:90px;
width:100%;
z-index:99;
}
#menulayer {
position:absolute;
top:90px;
left:0px;
height:20px;
width:100%;
background-color:#CCFFCC;
}
#menu_hjem {
position:absolute;
top:0px;
left:0px;
height:100%;
width:100px;
background:#33FF00;
}
#menu_om_os {
position:absolute;
top:0px;
left:110px;
height:100%;
width:100px;
background:#33FF00;
}
#menu_produkter {
position:absolute;
top:0px;
left:220px;
height:100%;
width:100px;
background:#33FF00;
}
#menu_datablade {
position:absolute;
top:0px;
left:330px;
height:100%;
width:100px;
background:#33FF00;
}
#menu_info {
position:absolute;
top:0px;
left:440px;
height:100%;
width:100px;
background:#33FF00;
text-align:center;
}
#menu_agenturer {
position:absolute;
top:0px;
left:550px;
height:100%;
width:100px;
background:#33FF00;
}
#menu_kontakt {
position:absolute;
top:0px;
left:660px;
height:100%;
width:110px;
background:#33FF00;
}
.menutext {
position:absolute;
left:3em;
/*width:50%;*/
bottom:20%;
font-family:Verdana;
font-size:10px;
color:#000000;
font-weight:bold;
}
#sidelayer {
position:absolute;
bottom:20px;
left:782px;
height:97%;
width:16px;
margin:0px auto;
background-color:#33FF00;
}
#content {
position:relative;
top:3px;
width:800px;
height:99%;
margin:0px auto;
border:1px solid #8587BC;
background-color:#FFFFFF;
}
html>#centerBoks {
width:800px;
}
.contentpic {
position:absolute;
top:425px;
left:455px;
height:200px;
width:275px;
z-index:99;
}
#bottomlayer {
position:absolute;
bottom:0px;
left:0px;
height:20px;
width:100%;
margin:0px auto;
background-color:#33FF00;
}
.bottomtext {
position:absolute;
left:0px;
width:100%;
bottom:4px;
font-family:Verdana;
font-size:10px;
color:#000000;
font-weight:bold;
}
</style>
</head>
<body>
<div id="content">
<div class="contentpic" id="contentpic"><img src="images/contentpic.gif" width="275" height="200" /></div>
<div id="toplayer"></div>
<div class="toplogo" id="toplogo"><img src="images/toplogo.gif" width="100%" height="90" /></div>
<div id="menulayer">
<div id="menu_hjem"><p class="menutext">Hjem</p></div>
<div id="menu_om_os"><p class="menutext">Om os</p></div>
<div id="menu_produkter"><p class="menutext">Produkter</p></div>
<div id="menu_datablade"><p class="menutext">Datablade</p></div>
<div id="menu_info"><p class="menutext">Information</p></div>
<div id="menu_agenturer"><p class="menutext">Agenturer</p></div>
<div id="menu_kontakt"><p class="menutext">Kontakt</p></div>
</div>
<div id="sidelayer"></div>
<div id="bottomlayer"><p class="bottomtext">bla bla bla </p></div>
</div>
</body>
</html>
Måske nogen, der kan finde noget smart? :)Der er al teksten i "menutext"-classen, der skal centreres.