HTML/CSS: Hjälp med 3 kolumner, den tredje hamnar fel!
Jag har ett grymt irriterande problem som jag inte lyckas lösa.
Jag har tre kolumner som ska ligga bredvid varann, kolumn nummer ett och två ligger precis där jag vill, men den tredje ("right") vill av någon anledning ligga på raden under, och det vill ju inte jag.
Om det finns någon vänlig själ som har lite mer kunskap än jag har som kan hjälpa mig så skulle jag verkligen uppskatta det!
Så här ser det ut:
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Titel.</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
<?php require($DOCUMENT_ROOT . "header.html");
?><br /></div>
<div id="content">
<img src="bilder/pro.jpg" width="900px" height="450px" alt="bild stor" /><br /><br />
<div id="left">
<img src="bilder/1.jpg" width="290px" height="150px" alt="bild1" />
<h3>Hej</h3>
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."
</div>
<div id="mitt">
<img src="bilder/2.jpg" width="290px" height="150px" alt="bild2" />
<h3>Hå</h3>
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."
</div>
<div id="right">
<img src="bilder/3.jpg" width="290px" height="150px" alt="bild3" />
<h3>Hå</h3>
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."
</div>
</div>
</div>
<div id="footer">
<?php require($DOCUMENT_ROOT . "footer.html");
?><br /></div>
</body>
</html>
CSS:
@charset "UTF-8";
/* CSS Document */
html, body {
margin: 0px;
padding: 0px;
font-family: Calibri;
font-size: 14px;
color: #333333;
}
html {
background-color: #CCCCCC;
}
/*Delar*/
#container {
width: 900px;
margin-left: auto;
margin-right: auto;
margin-top: 0px;
background:#FFF;
padding: 10px;
}
#footer {
width: 900px;
margin-left: auto;
margin-right: auto;
margin-top: 0px;
padding: 10px;
background:#ffffff;
color:#CCC;
}
#content {
width: 900px;
height: auto;
margin-left: auto;
margin-right: 0px;
margin-top: 10px;
margin-bottom: 30px;
}
#header {
width: 900px;
height: 84px;
margin-left: 0;
margin-right: auto;
background-color: #ffffff;
border: 0px ;
}
/*H*/
h1 {
font-family: Calibri;
font-weight: normal;
font-style: italic;
font-size: 35px;
color: #d2da00;
margin-top: 5px;
margin-bottom: 0px;
padding: 0px;
}
h2 {
font-family: Calibri;
font-weight: normal;
font-style: italic;
font-size: 20px;
color: #ffffff;
margin-top: 0px;
padding: 0px;
text-shadow: #333333 4px 4px 4px;
}
h3 {
font-family: Calibri;
font-weight: normal;
font-style: italic;
font-size: 20px;
color: #333333;
margin-top: 0px;
margin-bottom: 0px;
padding: 0px;
}
#header h2 {
font-family: Calibri;
font-weight: normal;
font-style: italic;
font-size: 25px;
color: #becbd9;
margin: 0px;
padding: 0px;
}
#menu {
height: 84px;
width: 900px;
padding: 0px;
font-size: small;
font: calibri;
color:#ffffff;
font-weight: bold;
}
/*Länkar*/
a:visited {
font-weight:bold;
color: #333333;
}
a:hover {
color: #333333;
font-weight:bold;
text-decoration:underline;
}
a:active {
color: #333333;
font-weight:bold;
}
a:link {
color: #333333;
font-weight:bold;
}
a {
text-decoration:none;
font-weight:bold;
color:333333;
}
/*Kolumner jao*/
#left, #mitt, #right {
width: 290px;
margin:0px;
padding:0px;
}
#left { float:left;
}
#mitt {
margin-left: 305px;
margin-right: 305px;
}
#right {
float: right;
}