使用下面的代码我正在尝试制作" ThumbNails"与contet(动态)一样大,并且只显示(仅)一个水平滚动条,如果不适合在contining div中,但我失败了。 我做错了什么?
HTML:
<body>
<div id="Fascione"></div>
<div id="Wrapper">
<div id="Menu"></div>
<div id="Contenuto">
<div id="VariableImg"></div>
<div id="Back"></div>
<div id="Next"></div>
<div id="ThumbNails">
<img><img><img>
</div>
</div>
</div>
<div id="Footer"></div>
</body>
的CSS:
body{width:1024px; margin:0px auto;}
div#Fascione{width:inherit;min-height:125px;border-bottom:2px solid black;}
div#Wrapper{width:inherit;padding:8px 0px 4px 0px;}
div#Wrapper{width:inherit;padding:8px 0px 4px 0px;}
div#Menu{float:left;width:200px;}
div#Contenuto{overflow:hidden;margin-left:208px;}
div#Back, div#Next{width:49%;cursor:pointer;text-align:center;margin:1% auto;border:1px dotted #1111cc;background-color:#ffffff;}
div#Back{float:left;}
div#Next{float:right;}
div#Back:hover, div#Next:hover{border:1px solid #1111cc;}
div#ThumbNails{clear:both;max-height:180px;overflow-x:auto;overflow-y:hidden;background-color:#f0f0f0;}
div#Footer{clear:left;width:inherit;} /* clear left needed in combination with the overflow:hidden of Contenuto */
已修改:删除旧的无效链接。
答案 0 :(得分:0)
正如@My Head Hurts指出的那样,正确的答案是添加white-space:nowrap;
。