HighDots Forums  

Basics for making a Firefox div contain contents wider than port

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Basics for making a Firefox div contain contents wider than port in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Alan
 
Posts: n/a

Default Basics for making a Firefox div contain contents wider than port - 09-30-2005 , 12:19 PM






I am frequently doing something like the following:

<div style="width:95%; padding:10px;margin:5px;">
<table>Contents include stuff that won't compress beyond a certain
point.</table>
</div>

In IE6, either mode, as the port shrinks to less than the width of the
table, either through a small screen size or shrinking the browser
window, the right edge of the div maintains its 10px padding with the
table. But in FF, as the port shrinks, the <div> shrinks with it,
leaving the table extending outside the div.

I'm guessing this is an IE non-standards-based feature, but it is
darned useful. Suggestions appreciated... got to be a common issue.
I'm hack-literate... just need to know the trick.


Reply With Quote
  #2  
Old   
Rijk van Geijtenbeek
 
Posts: n/a

Default Re: Basics for making a Firefox div contain contents wider than port - 09-30-2005 , 08:24 PM






On Fri, 30 Sep 2005 18:19:51 +0200, Alan <agatlbridge (AT) yahoo (DOT) com> wrote:

Quote:
I am frequently doing something like the following:

div style="width:95%; padding:10px;margin:5px;"
table>Contents include stuff that won't compress beyond a certain
point.</table
/div

In IE6, either mode, as the port shrinks to less than the width of the
table, either through a small screen size or shrinking the browser
window, the right edge of the div maintains its 10px padding with the
table. But in FF, as the port shrinks, the <div> shrinks with it,
leaving the table extending outside the div.

I'm guessing this is an IE non-standards-based feature, but it is
darned useful. Suggestions appreciated... got to be a common issue.
I'm hack-literate... just need to know the trick.
Specify 'min-width' instead of 'width'. This isn't supported by MSIE
though, so you might have to use a hack to give MSIE 6 the 'width'
property and modern browsers the 'min-width' property.

Something like this:

div {
width: 95%;
min-width: 95%;}

html>body div {width: auto;} /* reset 'width' property to automatic for
Opera and FF etc*/

--
Get Opera 8 now! Speed, Security and Simplicity.
http://my.opera.com/Rijk/affiliate/

Rijk van Geijtenbeek


Reply With Quote
  #3  
Old   
Alan
 
Posts: n/a

Default Re: Basics for making a Firefox div contain contents wider than port - 10-03-2005 , 03:26 PM



Tx... min-width solved the FF problem, and IE was already fine, since
in effect it imposes a min-width equal to the width of the contents.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.