jasonchan
09-03-2006, 05:26 AM
Let me start by stating that I am new in web development and currently just browsing online for examples. I recently stumbled upon a 2 column layout design. Below is the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head><title>Example</title>
<style type="text/css">
@import "all.css";
body {
margin:0px 0px 0px 0px;
}
#leftcontent {
float:left;
width:300px;
background:brown;
border-right:2px solid #000;
border-bottom:2px solid #000;
margin-right:10px;
padding-left: 30px;
padding-bottom:15px;
}
#rightcontent {
}
p,h1, {
margin:0px 30px 10px 30px;
}
h1 {
font-size:14px;
padding-top:10px;
}
#rightcontent p {
font-size:10px;
margin-left:0 px;
}
</style>
</head>
<body>
<div id="leftcontent">
<h1><a href="home.html">HOME</a></h1>
<h1><a href="menu.html">MENU</a></h1>
<h1><a href="contact.html">CONTACT</a></h1>
<h1><a href="order.html">ORDER</a></h1>
<h1><a href="about.html">ABOUT</a></h1>
</div>
<div id="rightcontent">
<h1>Welcome</h1>
</div>
</body>
</html>
My question is ... how do i extend the vertical background color (brown) all the way down, continously in some sense, for the div id "leftcontent" and right content.
Also when i adjust the browser window, horizontally, the div id="right content" falls under the div id="left content". How do you fix this error? I know that you will have to edit some information in the CSS of #rightcontent but what exactly would i need to do?
Again, thanks for your kind responses
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head><title>Example</title>
<style type="text/css">
@import "all.css";
body {
margin:0px 0px 0px 0px;
}
#leftcontent {
float:left;
width:300px;
background:brown;
border-right:2px solid #000;
border-bottom:2px solid #000;
margin-right:10px;
padding-left: 30px;
padding-bottom:15px;
}
#rightcontent {
}
p,h1, {
margin:0px 30px 10px 30px;
}
h1 {
font-size:14px;
padding-top:10px;
}
#rightcontent p {
font-size:10px;
margin-left:0 px;
}
</style>
</head>
<body>
<div id="leftcontent">
<h1><a href="home.html">HOME</a></h1>
<h1><a href="menu.html">MENU</a></h1>
<h1><a href="contact.html">CONTACT</a></h1>
<h1><a href="order.html">ORDER</a></h1>
<h1><a href="about.html">ABOUT</a></h1>
</div>
<div id="rightcontent">
<h1>Welcome</h1>
</div>
</body>
</html>
My question is ... how do i extend the vertical background color (brown) all the way down, continously in some sense, for the div id "leftcontent" and right content.
Also when i adjust the browser window, horizontally, the div id="right content" falls under the div id="left content". How do you fix this error? I know that you will have to edit some information in the CSS of #rightcontent but what exactly would i need to do?
Again, thanks for your kind responses