水平订购div标签 [英] order div tags horizontally

查看:72
本文介绍了水平订购div标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一系列DIV标签设置为浮动:左边有效地将它们放在一起。

现在我希望它们继续比容器更宽(并显示水平方向)滚动条)。我可以管理这个,如果我把容器的宽度放在这样:

I have a range of DIV tags set to float: left which effectively puts them next to each other.
Now I want them to continue further right than the container is wide (and show a horizontal scrollbar). I can manage this if I put the container's width like this:

width:10000px;/*ridiculously high value*/





我想要的是什么(因为容器的内容)构建动态。)是将其设置为内容的宽度。我尝试过使用不同DIV标签的大量(谷歌提供的)东西,但对width属性的任何更改都会开始垂直生成垂直滚动条。





这是(最新的)css:



What I want however (since the container's content is build dynamic.) is to set this to the content's width. I've tried numerous (google provided) things with the different DIV tags, but any change to the width property starts generating vertically with a vertical scrollbar.


this is the (latest) css:

div.plottypecollection{height:450px;width:10000px;}
div.plottype{margin-right:5px;float:left;margin-top: -35px;margin-left:0px;margin-bottom: 25px; }
div.plottypecontents{margin-left:5px;margin-top: -20px;}
div#tinyinfo{font-size: small;color:#CCCCCC;font-style:italic;}





其中plottypecollection包含许多plottype DIV标签。

我的猜测是我可能需要做一些变化的组合,但我可以找不到正确的,所以任何提示都会很棒。



谢谢。



where plottypecollection contains many plottype DIV tags.
My guess is that I probably need to do a combination of changes, but I can't find the correct ones, so any tips on this would be great.

thanks.

推荐答案

您好,

解决方案可能是这样的。!

div.plottypecollection {height:450px; min-width:10000px; width:auto; position:relative; overflow :scroll;} / *这里min-width添加水平滚动条和宽度将增加无限宽度。* /



div.plottype {position:fixed;} / * add位置:固定* /



喜欢这个链接

http://woorktuts.110mb.com/horizo​​ntal_layout/index.html#end [ ^ ]


访问此处...



http://www.daniweb.com/web-development/web-design-html-and-css/threads/126631/putting-two-p-or-div-tags-horizo​​ntally-在同一平面上对齐 [ ^ ]







http://www.dreamincode.net/forums/topic/33201-best-way-to-align-divs-horizo​​ntally/ [ ^ ]
visit here...

http://www.daniweb.com/web-development/web-design-html-and-css/threads/126631/putting-two-p-or-div-tags-horizontally-aligned-on-same-plane[^]

or

http://www.dreamincode.net/forums/topic/33201-best-way-to-align-divs-horizontally/[^]


这篇关于水平订购div标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆