[WEB4LIB] Re: specifying the width, in pixels, of a line of text

Justin Rounds jrounds at uchicago.edu
Fri Jan 7 19:17:08 EST 2005


Thanks for the link, Kevin! I must apologize for my erroneous example in 
my previous email -- I forgot that the IE5 width does *not* include the 
margins, so my example would be better if I had substituted "border" for 
"margin".

I'm sorry for the oversight.
_
j


Kevin W Bishop wrote:
> -----Original Message-----
> From: web4lib at webjunction.org
> [mailto:web4lib at webjunction.org] On Behalf Of Justin Rounds
> Sent: Friday, January 07, 2005 2:59 PM
> To: Multiple recipients of list
> Subject: [WEB4LIB] Re: specifying the width, in pixels, of a line of
> text
> 
> It depends on which version of IE you're referring to -- IE5's 
> implementation of the box model was completely wrong, but IE6 seems to 
> be ok (at least I haven't had any width-related problems yet).
> 
> The box model specifies width as the width of the _content_ inside the 
> box, and does not refer to the box itself, e.g. a <div 
> style="width:200px;margin:10px;padding:10px"> would take up a 220px-wide
> 
> space on the page, *not* 200px. IE5 treats the width as being the width 
> of the box itself, so in the previous example the div would take up a 
> 200px-wide space on the page, *not* 220px.
> 
> I know this is certainly the case with divs, but the rules may be 
> different for other block-level elements.
> 
> There are hacks to workarounds this, however. Look here for more 
> information:
> 
> http://www.info.com.ph/~etan/w3pantheon/style/abmh.html
> 
> You can read more about the box model here:
> 
> http://www.w3.org/TR/REC-CSS2/box.html
> ____________________________
> 
> 
> If you don't declare a doctype, IE6 will go into "quirks mode"
> (technical term) and continue to display the wrong box model behavior.  
> 
> A fuller explanation, including box model hacks, can be found here:
> http://www.positioniseverything.net/articles/box-model.html
> 
> 
> To the original question: have you tried specifying the width of a
> containing div for the images (left and right) and contained text?
> Actually, you probably want to define the min-width but, again, IE
> doesn't cooperate with us here.  
> 
> Hope this helps.
> -kb
> 
> ___________________________
> Kevin W. Bishop > bishopk at rpi.edu
> Communication & Collaboration Technologies
> Rensselaer Polytechnic Institute > http://www.rpi.edu/
>   RPInfo: http://www.rpi.edu/rpinfo/
> 
> 
> 
> 

-- 
-------------------------------------------
Justin Rounds
Graphic Design and Digital Media Specialist
Digital Library Development Center
University of Chicago
1100 East 57th Street
Chicago, Illinois 60637
(773)702-4391
-------------------------------------------



More information about the Web4lib mailing list