Thanks for the suggestion. I'm sure this will work, but I really wanted 
something that didn't involve changing the HTML.

Is there no way of making a block element adopt the width of its contents? 

 >  -----Original Message-----
 >  From: Kelly Miller [mailto:[EMAIL PROTECTED]
 >  Sent: 18 November 2005 02:04
 >  To: Barnaby Scott
 >  Cc: [EMAIL PROTECTED]; [email protected]
 >  Subject: Re: [css-d] Div shrinking to content width in IE
 >  
 >  
 >  Try placing the margins and so on on the <h2>, then add a 
 >  <span> and put 
 >  the background image and the border on that.
 >  
 >  Barnaby Scott wrote:
 >  
 >  >The reason I had {position: relative;} was so that I could 
 >  force a vertical
 >  >space before the H2 and reduce the space below it (by a 
 >  combination of line
 >  >height and top offset). If I had left it as a block, I 
 >  could have forced it
 >  >down vertically with a top margin, but then I couldn't fix 
 >  the bottom border
 >  >to the length of the text.
 >  >  
 >  >
 >  
 >  
 >  -- 
 >  http://www.mozilla.org/products/firefox/ - Get Firefox!
 >  http://www.mozilla.org/products/thunderbird/ - Reclaim Your Inbox!
 >  
 >  Please avoid sending me Word or PowerPoint attachments.
 >  See http://www.gnu.org/philosophy/no-word-attachments.html
 >  

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to