Wednesday 5 September 2012

html float

<!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" />
<title>Untitled Document</title>
</head>

<body>

<div style="float: left; width: 50%; height: 100px; background:#F60"> </div>
<div style="float: right; width: 50%; height: 100px; background-color:#0F0 "></div>

<!--part 2-->

<div style="float: left; width: 600px; background: #F00">
<div style="float: left; width: 300px; background:#F60" > asdasdasd</div>
</div>


<!--part 3-->

<div style="float: left; clear: left; width: 33%; height: 100px; background:#F60"> </div>
<div style="float: left; width: 33%; height: 100px; background-color:#0F0 "></div>
<div style="float: left; width: 33%; height: 100px; background-color: #FF0"></div>




</body>
</html>

No comments:

Post a Comment