cc4digital
06-03-2010, 09:30 PM
Ok, I stripped every bit of code from my web page to bring it to the basics. Although at the basics I still do not see what the problem is. What am I missing here?
I have put a border on all div tags for clarity. Below is a picture of what my browser is showing.
Issue: My yellow and red div will not wrap around the pink and green div.
In short, I am trying to put 2 wrappers around two div tags.:rolleyes:
Any help on this simple box issue would be much appreciated while I still have a few strands of hair left.:p
<!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>
<title>Educational Site</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style type="text/css">
body {
font: 90%/1 arial, helvetica, sans-serif;
background:#333;
line-height: 130%;
width: 100%;
min-width: 970px;
}
/******WRAPPERl ******/
#wrapper {
width: 960px;/* The width of the background image needs to be 906px */
margin: 0 auto;/* center the page in Firefox */
text-align: left;
position: relative;
z-index: 2;
border: 4px solid yellow
}
/***** CONTENT WRAPPER *****/
#contentwrapper {
height:4px;
border:5px solid red;
}
/******CONTENT ******/
#content {
float: left;
width: 70%; /*635*/
border: 4px solid pink;
background:#999;
}
/***** SIDEBAR *****/
#sidebar {
float: left;
width: 15%; /*255*/
background: #E1E0EF;
border: 4px solid green;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="contentwrapper">
<div id="content">
<h1>asdfasdfasdf</h1>
<h1>asdfasdfasdf</h1>
<h1>asdfasdfasdf</h1>
<h1><!--content ENd--> </h1>
</div>
<div id="sidebar">
<h2>asdfasdfasdf</h2>
<h2>asdfasdfa</h2>
<h2>asdfasdf</h2>
<h2><!--sidebar END--></h2>
</div>
</div> <!--contentwrapper END-->
</div> <!--wrapper END-->
</body>
</html>
I have put a border on all div tags for clarity. Below is a picture of what my browser is showing.
Issue: My yellow and red div will not wrap around the pink and green div.
In short, I am trying to put 2 wrappers around two div tags.:rolleyes:
Any help on this simple box issue would be much appreciated while I still have a few strands of hair left.:p
<!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>
<title>Educational Site</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style type="text/css">
body {
font: 90%/1 arial, helvetica, sans-serif;
background:#333;
line-height: 130%;
width: 100%;
min-width: 970px;
}
/******WRAPPERl ******/
#wrapper {
width: 960px;/* The width of the background image needs to be 906px */
margin: 0 auto;/* center the page in Firefox */
text-align: left;
position: relative;
z-index: 2;
border: 4px solid yellow
}
/***** CONTENT WRAPPER *****/
#contentwrapper {
height:4px;
border:5px solid red;
}
/******CONTENT ******/
#content {
float: left;
width: 70%; /*635*/
border: 4px solid pink;
background:#999;
}
/***** SIDEBAR *****/
#sidebar {
float: left;
width: 15%; /*255*/
background: #E1E0EF;
border: 4px solid green;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="contentwrapper">
<div id="content">
<h1>asdfasdfasdf</h1>
<h1>asdfasdfasdf</h1>
<h1>asdfasdfasdf</h1>
<h1><!--content ENd--> </h1>
</div>
<div id="sidebar">
<h2>asdfasdfasdf</h2>
<h2>asdfasdfa</h2>
<h2>asdfasdf</h2>
<h2><!--sidebar END--></h2>
</div>
</div> <!--contentwrapper END-->
</div> <!--wrapper END-->
</body>
</html>