Hello,
I am new and after finishing step 5 from the Dream Waver tutorial i have encountered this problem.
In design mode the 3 colums(divs) are floating but when i looked at them in live mode or in a browser they ware not floating anymore. They ware stack on each other.
Beneath my whole css code:
@charset "utf-8";
@import url("check_menu.css");
body {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
color: #000;
background-color: #FFF;
}
/* CSS Document */
#container {
width: 968px;
background: #FFF;
margin: 0 auto;
padding-left: 10px;
padding-right: 10px;
overflow: hidden;
}#container h1 {
position: absolute;
top: -500px;
}
#banner {
position: relative;
}
#check_menu {
position: absolute;
/* [disabled]top: 50px; */
right: 0px;
bottom: 0px;
text-transform: uppercase;
}
#main_image {
background-image: url(../images/main.jpg);
background-repeat: no-repeat;
position: relative;
height: 376px;
width: 968px;
}
#main_text {
width: 300px;
position: absolute;
right: 60px;
bottom: 60px;
background-color: #fff;
}
#main_text h2 {
color: #00b4e1;
}
#main_text h3 {
font-size:16px;
margin: 0 auto;
}
#main_text p {
font-size: 14px;
margin: 0 auto;
padding: 12px;}
}
#left_column, #center_column, #right_column {
width: 316px;
float: left;
}
#center_column, #right_column {
margin-left: 10px;
Your code overall seems just fine except the include to check_menu.css.
<link href="styles/check_menu.css" rel="stylesheet" type="text/css" />
Add this line of code before </head> script in a new line.
stiil not working.
this is my new 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>Check Magazine</title>
<link href="Styles/check_cs5.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="styles/check_menu.css" rel="stylesheet" type="text/css" />
</head>
Luckily it's a relatively easy fix - at least it looks like it. The errors in your code becomes very apparent once your HTML and posted CSS are put together - I have posted 2 screenshots to show you the difference so you know what to look for in the future - invalid code on the left, valid on the right.
Make these changes to your CSS:
#main_text p {
font-size: 14px;
margin: 0 auto;
padding: 12px;}
} /* remove this */
#left_column, #center_column, #right_column {
width: 316px;
float: left;
}
#center_column, #right_column {
margin-left: 10px;} /* Add this */
In the future, if you have any issues, you should check your code in the validator. These are also available directly in DW - Window > Results > W3C Validator
HTML Validator: http://validator.w3.org/
CSS Validator: http://jigsaw.w3.org/css-validator/
In addition to my above post, your menu CSS needs to link correctly. HTML is cAsE sEnSiTiVe.
<link href="Styles/check_cs5.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="sStyles/check_menu.css" rel="stylesheet" type="text/css" />
North America
Europe, Middle East and Africa
Asia Pacific