Div tags, how to create rows with them
How to you define 开发者_如何学运维a row in div tags
High level example in pseudo code:
[DIV TAGS LEFT] [DIV TAGS CENTER] [DIV TAGS RIGHT]
[WHAT GOES HERE?????]
[DIV TAGS LEFT] [DIV TAGS CENTER] [DIV TAGS RIGHT]
[WHAT GOES HERE?????]
[DIV TAGS LEFT] [DIV TAGS CENTER] [DIV TAGS RIGHT]
this may work
<style>
.parent {
margin-bottom: 15px;
padding: 10px;
color: #0A416B;
clear:both;
}
.left, .center, .right{
float:left;
width:32%;
border:1px solid #CEDCEA;
padding:5px;
}
</style>
<div class="parent">
<div class="left">
Left
</div>
<div class="center">
center
</div>
<div class="right">
right
</div>
<div style="clear:both;"></div>
</div>
If I understand the question, you need this HTML structure:
<div class="row">
<div class="left"></div><div class="center"></div><div class="right"></div>
</div>
... and this CSS:
div.row {
clear:both;
}
<div class="parent">
<div class="left">left</div>
<div class="center">center</div>
<div class="right">right</div>
</div>
styling:
.parent {
overflow: auto;
}
.parent>div {
float: left;
width: 33%;
}
This should give you what your looking for.
精彩评论