billatl
11-16-2009, 11:45 PM
Hello,
Trying to place two DIV boxes inside of another - but the two boxes will not stay within the large wrapper - except for IE (a first). The code validates in Dreamweaver but does not display correctly. What's wrong?
<!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>
<style type="text/css">
<!--
.bigbox {
width:800px;
border:5px solid #f2f2f2;
padding:5px;
display:block
}
.smallleftbox {
float:left;
padding:5px;
width:500px;
background-color:#0000FF;
}
.smallrightbox {
float:left;
padding:5px;
width:140px;
background-color:#FF0000;
}
-->
</style>
</head>
<body>
<div class="bigbox">
<div class="smallleftbox">test1</div>
<div class="smallrightbox">test2</div>
</div>
Trying to place two DIV boxes inside of another - but the two boxes will not stay within the large wrapper - except for IE (a first). The code validates in Dreamweaver but does not display correctly. What's wrong?
<!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>
<style type="text/css">
<!--
.bigbox {
width:800px;
border:5px solid #f2f2f2;
padding:5px;
display:block
}
.smallleftbox {
float:left;
padding:5px;
width:500px;
background-color:#0000FF;
}
.smallrightbox {
float:left;
padding:5px;
width:140px;
background-color:#FF0000;
}
-->
</style>
</head>
<body>
<div class="bigbox">
<div class="smallleftbox">test1</div>
<div class="smallrightbox">test2</div>
</div>