Making two DIVs the same height
I would like to have the #textblock div to have at the same hight as #brevillestandard div.
CSS:
#textblock {
width: 260px;
border: 1px solid #999999;
padding: 0 5px;
float开发者_如何转开发: right;
font-size: 95%;
background-color: #FEF4CC;
}
#brevillestandard {
padding: 8px 0 0 5px;
height: 80px;
Width: 61%;
border: 1px solid #999999;
float: left;
margin: 5px 5px 5px 0;
}
The answer is literally in the question.
You're giving #brevillestandard
a height of 80px.
Add:
height: 80px;
to any other elements you want to be the same height.
Are they not the same height when you set the height
in the CSS for both of them?
Perhaps it's the different padding
that is causing the difference in their appearance?
If you make the CSS identical, do the two div
s look the same? That might be one place to start. Or apply the same CSS class to both, and see if they look the same then.
精彩评论