erenpasa
asked on
Floating Div
Hi,
I want to a layout like this.
div1-div2-div3
div4-div5-div6
i use col css class form div1,div2 and div3.
after row css class for div4. it's okay. but div5 and div6 go to new line (i use col class too for div5,div6)
How can i fixed it?
Ps: I will don't use any container div. I use just css class. And it has to be cross browser.
I attach code and file.
I want to a layout like this.
div1-div2-div3
div4-div5-div6
i use col css class form div1,div2 and div3.
after row css class for div4. it's okay. but div5 and div6 go to new line (i use col class too for div5,div6)
How can i fixed it?
Ps: I will don't use any container div. I use just css class. And it has to be cross browser.
I attach code and file.
<!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">
<style>
.col { FLOAT: left !important; content: "."; background:red;border:yellow 1px solid;width:100px;}
.row{
content: ".";
background:blue;
width:100px;
border:yellow 1px solid;
}
</style>
<head>
</head>
<body>
<div class="col">
DIV 1
</div>
<div class="col">
DIV 2
</div>
<div class="col">
DIV 3
</div>
<div class="row">
DIV 4
</div>
<div class="col">
DIV 5
</div>
<div class="col">
DIV 6
</div>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
You solved my problem. Thanks.
I wonder that is it best way to solution?
For example is there any way with change div4's css?