这可能是一个基本的CSS问题,但我对CSS并不流利,似乎在兜圈子。
这是我用英语写的:我有一个固定宽度400px的select元素。每个选项的文本都不适合那个400px的宽度。我没有得到一个水平滚动条,它只是切断了文本。如何获得滚动条?
下面是我在HTML/CSS中拥有的内容:
<div>
<select style="width=400px">
<option>this text is too wide to fit and gets cut off.....</option>
...
</sele
作为需求,我需要水平和垂直滚动条在select DIV研究中,我发现select不支持水平滚动bar.so,我将SELECT包装在DIV中。
<style type="text/css">
.scrollable{
overflow: auto;
width: 70px; /* adjust this width depending to amount of text to display */
height: 80px; /* adjust height depending on number of options to display */
我想知道为什么我的桌面css for 的内部包装不能工作。
基本上,如果将内部包装设置为margin:0 auto; and width: auto;没有问题,但它不在页脚或主div上居中
当我将innerwrap设置为margin:0 auto; and width:960px;时,您会注意到,在稍微调整窗口大小后,页面会显示一个水平滚动条,并且所有内容都被挤压到左侧,白色背景开始变得可见。
有没有办法让它流畅地过渡到下一个平板电脑大小的布局,而不会出现滚动条和内容被挤压?