基本上 IF div.Pageheader Description
包含 NO img
和 NO div#cat-text
,然后我想将高度为 0px, 这样就不会有白色的空间 。
这是我的CS:"/强"
.PageHeaderDescription {
height: 320px;
position: relative;
width: 99%;
}
< 坚固> 这是 CSS 路径: 坚固 >
html body div#Container div#Content div.PageHeaderDescription
<强 > 下方是 HTML 强>
<div class="PageHeaderDescription">
<img border="0" src="images/Category/large/22.png" class="c1" />
<div id="cat-text" class="c2">
<table>
<tbody>
<tr>
<td>
<h1>1 Person</h1>
</td>
<td><span>test</span></td>
</tr>
</tbody>
</table>
</div>
</div>
Is using jquery the best way or could i use clear:both some how? Could you help me, i am not sure how to check for elements in a div using jquery. I know contains works for string values?