ilovetechno
10-21-2009, 08:43 PM
I have been using tables for my page layouts and I am sick of putting off learning another way, I need to move on and up! The reason I rely on them is because I really don't know any other way.
So I'm going to try using divs to get the same effect, hoping it works out even better. But the problem is I don't know how to use them correctly. Heres what I'm trying and the div background colors are not showing up
The CSS
.header { width: 100%; margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; background-color: #000000; }
.body { width: 100%; margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;
background: #ffffff; }
Heres the 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">
<head>
<link rel="stylesheet" type="text/css" media="all" href="test.css" />
<style type="text/css">
body {background-color: #ff99cc;}
A:link {text-decoration: none}
A:visited {text-decoration: none}
A:active {text-decoration: none}
A:hover {text-decoration: none}
</style>
</script>
</head>
<body>
<div id="header"><center><img src="images/ctemptbann.jpg"><br><img src="images/intim.jpg"></div>
<div id="body">
</body>
</html>
So I'm going to try using divs to get the same effect, hoping it works out even better. But the problem is I don't know how to use them correctly. Heres what I'm trying and the div background colors are not showing up
The CSS
.header { width: 100%; margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; background-color: #000000; }
.body { width: 100%; margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;
background: #ffffff; }
Heres the 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">
<head>
<link rel="stylesheet" type="text/css" media="all" href="test.css" />
<style type="text/css">
body {background-color: #ff99cc;}
A:link {text-decoration: none}
A:visited {text-decoration: none}
A:active {text-decoration: none}
A:hover {text-decoration: none}
</style>
</script>
</head>
<body>
<div id="header"><center><img src="images/ctemptbann.jpg"><br><img src="images/intim.jpg"></div>
<div id="body">
</body>
</html>