W3C home > Mailing lists > Public > www-style@w3.org > June 2007

Re: Stylings only possible with Tables

From: Raul Dias <raul@dias.com.br>
Date: Sat, 23 Jun 2007 20:51:39 -0300
To: James Elmore <James.Elmore@cox.net>
Cc: www-style@w3.org
Message-Id: <1182642700.5036.117.camel@speedy.swi>

On Sat, 2007-06-23 at 16:24 -0700, James Elmore wrote:
> Raul Dias wrote:
> > I agree with what you said.
> > 
> > My point is that removing the phrase below from the 2.1 definition about
> > % heights (10.5) already provides developers to acomplish this in a
> > clean way.  Not the best way (no grouping), but a clean path to start
> > (and the implementation is already ready for current renders).
> > 
> > 	If the height of the containing block is not specified 
> > 	explicitly (i.e., it depends on content height), and this 
> > 	element is not absolutely positioned, the value computes to 
> > 	'auto'.
> Maybe I'm not understanding, but this would only allow the content height to 
> control the height of the containing block. 

> If the contents of similar blocks 
> are the same heights, the blocks would have the same heights. But, if the 
> contents have different heights (the problem several developers have mentioned), 
> then their heights would not match.
Sure. Thats what the CSS does now.

>  What seems to be requested is that 
> developers / designers want some way to make heights / widths match, even when 
> they are not within the same block and do not have identical content sizes.
Yes, and the reason for this (considering the same container) is the paragraph a showed before.
So, as I said earlier, removing that phrase solves this case.

Consider this:
<div id="parent">
 <div id="column" style="float: left">
   ... column content (e.g. menu) This could be random ...
 <div id="content">
   ... random content ...

In this situation, the #content or #column block will dictate the
#parent height, the heightest one will win.  The other one will be
always shorter, unless you are extremely lucky (considering you have no
control over content).

If the phrase I showed before from CSS21 did not exist, adding
height:100%; to both #content and #column would solve the problem.

As you said this wont help for having blocks with the same height if
they have different containers (parents), but is a more common situation
where equal columns are needed.  

I have ressalted this, becasuse the implementation is probably already
there, most complaint rendering engines when they see a "height: xx%;"
will check to see if the parent height was explicit specified and
fallback to "auto" is not.  All is required is to jump over this check.

Right now the ways to accomplish this:
- CSS hacks (negative giants paddings/margins) which usually break other
- Javscript.
- Fall back to table design.

-Raul Dias
Received on Saturday, 23 June 2007 23:52:29 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:29 UTC