1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>TEMPLATE</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
border: 0;
font-family: Arial;
}
#global {
width: 600px;
}
#left {
float: left;
width: 100px;
height: 400px;
background: yellow;
}
#right {
float: right;
width: 150px;
height: 400px;
background: yellow;
}
#center {
margin: 0 150px 0 100px;
}
#center img {
float: left;
display: block;
width: 100px;
height: 200px;
border: solid 1px #999;
background: #CCC;
}
#center hr {
clear: left;
color: red;
background: red;
height: 3px;
}
</style>
</head>
<body>
<div id="global">
<div id="left">LEFT COL</div>
<div id="right">RIGHT COL</div>
<div id="center">
<p><img /><- here a float left IMG.<br />Below I use an HR to clear this float so I can add some content whitch won't be display beside the IMG.</p>
<p>But it appears that this HR also clears the Left & Right column float...<br />Is there any way It could only clear the IMG float ?</p>
<hr />
<p>But it appears that this HR also clears the Left & Right column float...<br />Is there any way It could only clear the IMG float ?</p>
</div>
</div>
</body>
</html> |
Partager