等高浮动柱 [英] equal height floated columns

查看:76
本文介绍了等高浮动柱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得出的结论是浮动从未用于设计

页面,但有一种很好的方法可以使用以下内容浮动三列

特点?


leftColumn 20%

rightColumn 20%

centerColumn使用剩下的东西

我目前正在将centerColumn定义为%,但要使其正常工作

正确的边距,填充和边框设置必须完全是

左右两列相同。谈论一个痛苦。


所有三列中的高度应该等于100%而且我不在附近

找到解决方案。


最佳解决方案不包括绝对定位,表格,

图像或1000 hacks。

解决方案

zzpat< zz ******* @ gmail.comwrote:


>我来到了结论浮动从未用于设计
页面



正确,假设通过设计页面你的意思是创建一个布局。

不是不是为了如果一个CSS方法做得很好就应该很重要

用于你想要的任何其他目的。但这不是

的情况,浮动会导致一系列问题,当它被滥用时,b $ b创建一个CSS布局。
< blockquote class =post_quotes>
>,但是有一个很好的方法来浮动具有以下
特征的三列吗?



我认为你打算写一些类似创建的东西。而不是

浮动。 CSS 2.x创建布局的选项非常有限,而且它没有提供专门为此目的设计的任何内容。


> leftColumn 20%
rightColumn 20%
centerColumn使用剩下的内容

我目前正在将centerColumn定义为%,但要使其工作
正确的边距,填充和边框设置必须与leftCrumns和rightColumns完全相同。



没有这样的限制。


>所有三列中的高度应该等于100%



100%是什么?


>我不在附近
找到解决方案。



您是否检查过很多CSS布局模板?


>最佳解决方案不包括绝对定位



这将你的选项限制在大约为零,因为ABS定位是唯一可以考虑的CSS

方法适用于创建IE也支持的布局。

。你为什么准备反对ABS定位?


-

Spartanicus


3月16日, 17:14,zzpat< zzpatr ... @ gmail.comwrote:


我得出的结论是浮动从未用于设计

页面,但有一个很好的方法来浮动三列具有以下

特征?



使用< table>

(等高度意味着列之间的耦合只是

使用< tableelement以HTML格式表达。)


Andy Dingley写道:


3月16日17:14,zzpat< zzpatr ... @ gmail.comwrote:


>我来了结论浮动从来没有用于设计
页面,但有没有一个很好的方法来浮动具有以下
特征的三列?



使用< table>

(等高度意味着列之间的耦合只是

使用< tableelement以HTML格式表达。)



您对在表格中浮动整列的看法是什么?


我从来没有真正在一个表中浮动一列,所以我不知道可能发生的

问题。有多少?


我最有可能看到漂浮的三根柱子;如上所述,左,中间和

是否正确,但你会放弃浮动还是保留它?


I''ve come to the conclusion that float was never made for designing a
page, but is there a good way to float three columns with the following
characteristics?

leftColumn 20%
rightColumn 20%
centerColumn use what''s left

I''m currently defining centerColumn as a %, but to get this to work
properly the margin, padding and border settings have to be exactly the
same in both left and rightColumns. Talk about a pain.

Height in all three columns should equal 100% and I''m no where near
finding a solution.

The optimum solution wouldn''t include absolute positioning, tables,
images or 1000 hacks.

解决方案

zzpat <zz*******@gmail.comwrote:

>I''ve come to the conclusion that float was never made for designing a
page

Correct, assuming that by "designing a page" you mean create a layout.
Not that "not made for" should matter if a CSS method does a good job
for whatever other purpose you want to put it to. But that''s not the
case here, floating causes a raft of problems when it is abused to
create a "CSS layout".

>, but is there a good way to float three columns with the following
characteristics?

I presume you intended the write something like "create" instead of
"float". CSS 2.x has quite limited options to create a layout and it
doesn''t offer anything specifically designed for that purpose.

>leftColumn 20%
rightColumn 20%
centerColumn use what''s left

I''m currently defining centerColumn as a %, but to get this to work
properly the margin, padding and border settings have to be exactly the
same in both left and rightColumns.

There are no such limitations.

>Height in all three columns should equal 100%

100% of what?

>and I''m no where near
finding a solution.

Did you check the many CSS layout templates that are out there?

>The optimum solution wouldn''t include absolute positioning

That limits your options to about nil as ABS positioning is the only CSS
method that can be considered as suitable for creating a layout that is
also supported by IE. Why are you poised against ABS positioning?

--
Spartanicus


On 16 Mar, 17:14, zzpat <zzpatr...@gmail.comwrote:

I''ve come to the conclusion that float was never made for designing a
page, but is there a good way to float three columns with the following
characteristics?

Use a <table>

(Equal heights imply a coupling between columns that''s only
expressible in HTML by use of the <tableelement.)


Andy Dingley wrote:

On 16 Mar, 17:14, zzpat <zzpatr...@gmail.comwrote:

>I''ve come to the conclusion that float was never made for designing a
page, but is there a good way to float three columns with the following
characteristics?


Use a <table>

(Equal heights imply a coupling between columns that''s only
expressible in HTML by use of the <tableelement.)

What''s your opinion on floating an entire column within a table?

I''ve never actually floated a column in a table so I''m not aware of the
problems that might occur. Are there many?

I''m most likely looking at floating three columns; left, center and
right as mentioned previously but would you do away with float or keep it?


这篇关于等高浮动柱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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