I'm coding a website for a graphics design studio and I'm having a little problem. Having <p> tags anywhere in the container Div causes any other divs inside it to break apart. I've attached screenshots. I've never coded a website like this before so I have no clue how to fix it.
Heres a copy of the code (Please dont kill me for using dreamweaver generated code)
Heres a copy of the code (Please dont kill me for using dreamweaver generated code)
Code:
<!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" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Missing Box Studio</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
<style type="text/css">
<!--
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
background: #666666;
margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
color: #000000;
background-color: #FFF;
background-image: url(../images/bg.png);
background-repeat: repeat-x;
}
.oneColFixCtr #container {
width: 955px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
border: 0px solid #000000;
text-align: left; /* this overrides the text-align: center on the body element. */
filter:alpha(opacity=90);
-moz-opacity:0.9;
opacity: 0.9;
}
.oneColFixCtr #header {
width: 955px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
border: 0px solid #000000;
text-align: left; /* this overrides the text-align: center on the body element. */
}
.oneColFixCtr #footer {
width: 955px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
border: 0px solid #000000;
text-align: left; /* this overrides the text-align: center on the body element. */
}
.oneColFixCtr #mainContent {
padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
background-image:url(../images/bgdiv.png);
background-repeat:repeat-y;
}
body, td, th {
color: #FFF;
}
-->
</style>
</head>
<body class="oneColFixCtr">
<div id="container">
<div id="header"> <img src="../images/topdiv.png" alt="If you can see this, please enable images. Missing Box Studio." width="955" height="23" border="0" usemap="#Map" />
<map name="Map" id="Map">
<area shape="circle" coords="12,10,7" href="index.html" alt="Home" />
<area shape="rect" coords="412,3,543,20" href="index.html" alt="Home" />
</map>
</div>
<div id="mainContent">
<p>lol</p>
<!-- end #mainContent -->
</div>
<div id="footer"> <img src="../images/bottomdiv.png" alt="If you can see this, please enable images. Missing Box Studio." width="955" height="27" border="0" />
<!-- end #container -->
</div>
</div>
</body>
</html>