我如何停止“浮动”从浮动 [英] How do I stop "floats" from floating

查看:90
本文介绍了我如何停止“浮动”从浮动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一排5< DIVelements,其中包含float:left属性

因为我想要它们在同一行。我发出了一个清除:左对于

后续元素。


所有看起来都很棒,除非我增加浏览器文本大小的合同

屏幕,最后DIV漂浮在下面。反正有没有停止

这个并保持同一行?


谢谢,

Don

Hi,

I have a row of 5 <DIVelements that have the "float: left" attribute
as I wanted them on the same row. I issue a "clear: left" for the
subsequent element.

All looks great except if I increase the browser text size of contract
the screen, the last DIV floats underneath. Is there anyway to stop
this and keep all on the same row?

Thanks,
Don

推荐答案

donpro meinte:
donpro meinte:




我有一行5< DIVelements具有float:left和属性

因为我想要它们在同一行。我发出了一个清除:左对于

后续元素。


所有看起来都很棒,除非我增加浏览器文本大小的合同

屏幕,最后DIV漂浮在下面。反正有没有停止

这个并保持所有在同一行?
Hi,

I have a row of 5 <DIVelements that have the "float: left" attribute
as I wanted them on the same row. I issue a "clear: left" for the
subsequent element.

All looks great except if I increase the browser text size of contract
the screen, the last DIV floats underneath. Is there anyway to stop
this and keep all on the same row?



不是。由于观察到的现象,浮动是如何工作的。也许

你可以放大包含花车的容器(或者也可以在它上面缩放它。)
" em" ;.


Gregor

-
http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
http://web.gregorkofler.com ::: meine JS-Spielwiese
http://www.image2d.com :::Bildagenturfürdenalpinen Raum

Not really. Since the observed "phenomenon" is how floats work. Perhaps
you can enlarge the container containing the floats (or scale it in
"em", too).

Gregor
--
http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
http://web.gregorkofler.com ::: meine JS-Spielwiese
http://www.image2d.com ::: Bildagentur für den alpinen Raum


08/27/08 08:15 am,donpro写道:
On 05/27/08 08:15 am, donpro wrote:

>

我有一行5< DIVelements,其中包含float:left属性

因为我想要它们在同一行。我发出了一个清除:左对于

后续元素。


所有看起来都很棒,除非我增加浏览器文本大小的合同

屏幕,最后DIV漂浮在下面。反正有没有停止

这个并保持所有在同一行?
>
I have a row of 5 <DIVelements that have the "float: left" attribute
as I wanted them on the same row. I issue a "clear: left" for the
subsequent element.

All looks great except if I increase the browser text size of contract
the screen, the last DIV floats underneath. Is there anyway to stop
this and keep all on the same row?



将它们包裹在用ems设置的固定宽度的另一个div中。


-

jmm(连字符)列表(at)sohnen-moe(点)com

(删除.AXSPAMGN电子邮件)

Wrap them in another div of a fixed width set with ems.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)


5月27日16:15,donpro< donpro-2 ... @ rogers.comwrote:
On 27 May, 16:15, donpro <donpro-2...@rogers.comwrote:

所有看起来都很棒,除非我增加合同的浏览器文本大小

屏幕,最后一个DIV浮动在下面。反正有没有停止

这个并保持所有在同一行?
All looks great except if I increase the browser text size of contract
the screen, the last DIV floats underneath. Is there anyway to stop
this and keep all on the same row?



这就是浮点数。如果你想强制网格定位,即使它不再适合窗口大小,也要使用
,然后使用< table>

代替。


阅读 http://brainjar.com/css/positioning/ 好漂浮的物品


This is what float does. If you want to force the grid positioning,
even when it no longer fits into the window size, then use a <table>
instead.

Read http://brainjar.com/css/positioning/ for a good article of float
too.


这篇关于我如何停止“浮动”从浮动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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