W3C home > Mailing lists > Public > www-amaya@w3.org > October to December 2006

Re: PRE blocks don't extend to fill the available width and don't overflow

From: Stanimir Stamenkov <stanio@myrealbox.com>
Date: Wed, 13 Dec 2006 10:47:44 +0200
Message-ID: <457FBE30.1050308@myrealbox.com>
To: "www-amaya.w3.org" <www-amaya@w3.org>


> Actually I like the look of the PRE block in amaya compared to that 
> in Firefox ....  A block should only accommodate the width of 
> data in it .....

Unfortunately that's not how the CSS box model [1] works (and I'm 
sure there's a good reason for it).  What you want could be achieved 
with an inline-block [2], which is currently not well supported by 
all the common browsers (as far as I know Firefox 3 will bring a 
support for it) or a block with 'display: table'.

Note also the broken overflow behavior is apparent in IE6 but is 
fixed in IE7 [3].  You may checkout more details on IE7 CSS changes [4].

[1] <http://www.w3.org/TR/CSS21/visudet.html#blockwidth>
[2] <http://www.w3.org/TR/CSS21/visudet.html#q12>
[3] "Box Model Changes" 
[4] <http://blogs.msdn.com/ie/archive/2006/08/22/712830.aspx>, 

> I notice that blocks set to a specific width use 
> that size as a max size and not a set size in most browsers 
> and that gives designers the creeps because of unpredictability 
> however i guess the recommendation has lots of holes in it and 
> those are interpretted differently by implementers.

Received on Wednesday, 13 December 2006 08:54:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:30:52 UTC