|
<p>如何通过css控制这个框的大小?</p>
<p><img src="http://img.baidu.com/img/iknow/icn_point.gif"> 悬赏分:20 -</p>
<p>解决时间:2010-7-27 09:08</p>
<p>html代码部分:</p>
<p></div></p>
<p><div class="box shangsheng"></p>
<p><h2>专题推荐</h2></p>
<p><div class="content"></p>
<p><ol class="sort-list"></p>
<p>{maxcms:topiclist id=all}</p>
<p><li class="top"><em>[topiclist:i]</em><a href="[topiclist:link]" title="点击观看:
[topiclist:name]" target="_blank">[topiclist:name]</a> <span></p>
<p>[topiclist:des len=10]</span> <span class="score"><strong>↑</strong><span style="width:1px;" title="上升至第[topiclist:i]位"></span></span></li></p>
<p>{/maxcms:topiclist}</p>
<p></div></p>
<p>css代码部分:</p>
<p>.shangsheng .sort-list .score { width:25px; position:absolute; top:3px; left:182px; color:#FF5B01; font-size:10px; font-weight:bold; text-align:left; }</p>
<p>.shangsheng .sort-list .score strong {float:left; font-size:12px; font-weight:normal; font-family:"Verdana" ; }</p>
<p>.shangsheng .sort-list .score span {float:left; display:block; height:5px; font-size:1px; background:#e5e5e5; margin:6px 0 0 0;>margin:6px 0 0 3px;_margin:4px 0 0 0; }</p>
<p>.shangsheng .sort-list .scoredown { color:#8ac134; }</p>
<p>下图是实际效果</p>
<p>问:如何调整这个框的长短?</p>
<p>提问者: 月樵 - 六级</p>
<p>最佳答案</p>
<p>提一点,你给的代码中少了ol标签的结尾</ol></p>
<p>第二点,你给的CSS代码对我们来说没什么用</p>
<p>理论上来讲,如果你CSS代码中没有我下面要写的这段的话,是可以实现的。</p>
<p>直接通过.shangsheng{}实验,例如 .shangsheng{height:500px!important;}</p>
<p>如果没反应,就用 .shangsheng .content{height:500px!important;}</p>
<p>或者通过有序列表的行高,外边距撑开高度,都可以。</p>
<p>如果你不想修改代码,最简单的就是再给<div class="box shangsheng">一个类名,<div class="box shangsheng try">然后再CSS中添加.try{height:500px!important;}或者.try .content{height:500px!important;}</p>
<p>没解决的话,百度消息或者补充提问吧~好运</p>
<p>0</p>
<p>回答者:</p>
<p>y1cheng - 六级 2010-7-26 15:12</p>
<p>我来评论>></p>
<p>提问者对于答案的评价:</p>
<p>非常感谢</p>
|
|