House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / Cascading Style Sheets (CSS)

Make a float exactly 50%

Author:
Peter Boughton
03/30/2009 05:33 PM

Set the inner container to width:auto and it will fill the available space after setting it's margins/etc, whilst the outer container will constrain the whole thing to whatever size you set. e.g. <!DOCTYPE html> <body style="margin:0;width:100%;"> <div style="width:50%; margin:0; border-width:0; padding:0; background:red;">   <div style="width:auto; margin: 1em; border-width: 2px; background:blue;">     ...   </div> </div>


Search css

February 12, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29