Saturday, May 24, 2014

HTML TUTORIAL PART 71

HTML TUTORIAL PART 71

PROBLEM:
LOOK AT THE FOLLOWING:

This div occupies the left half.
This div occupies the right half.





SOLVED:
THE CODE BELOW MADE THE HTML TIP:

<!DOCTYPE html>
<html>
<head>
<style> 
div.container
{
width:30em;
border:1em solid;
}
div.box
{
-moz-box-sizing:border-box; /* Firefox */
box-sizing:border-box;
width:50%;
border:1em solid red;
float:left;
}
</style>
</head>
<body>

<div class="container">
<div class="box">This div occupies the left half.</div>
<div class="box">This div occupies the right half.</div>
</div>

</body>
</html>

No comments:

Post a Comment