Note that there are some explanatory texts on larger screens.

plurals
  1. PODiv not filling width of floated container (css expert needed
    primarykey
    data
    text
    <p>I know there are many variations of this question posted, but none I've found quite provide an answer that works for this case.</p> <p>I basically have two left floated divs. Inside those two divs are div headers and tabled content.</p> <p>I want the Div headers (Hour/Minute) to stretch to the width of the tabled content, but they only do this in FF and Chrome, not IE7. IE7 is my works official browser so the one I need it to work with the most.</p> <p>Here is the CSS:</p> <pre><code>#ui-timepicker-div { padding:0.2em; } #ui-timepicker-hours { float:left; } #ui-timepicker-minutes { margin:0 0 0 0.2em; float:left; } .ui-timepicker .ui-timepicker-header { padding:0.2em 0; } .ui-timepicker .ui-timepicker-title { line-height:1.8em; text-align:center; } .ui-timepicker table { margin:0.15em 0 0 0; font-size:.9em; border-collapse:collapse; } .ui-timepicker td { padding:1px; width:2.2em; } .ui-timepicker th, .ui-timepicker td { border:0; } .ui-timepicker td a { display:block; padding:0.2em 0.3em 0.2em 0.5em; text-align:right; text-decoration:none; } </code></pre> <p>Here is the HTML (did not include tabled content):</p> <pre><code>&lt;div style="position: absolute; top: 252.667px; left: 648px; z-index: 1; display: none;" class="ui-timepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" id="ui-timepicker-div"&gt; &lt;div id="ui-timepicker-hours"&gt; &lt;div class="ui-timepicker-header ui-widget-header ui-helper-clearfix ui-corner-all"&gt; &lt;div class="ui-timepicker-title"&gt;Hour&lt;/div&gt; &lt;/div&gt; &lt;table class="ui-timepicker"&gt; &lt;/table&gt; &lt;/div&gt; &lt;div id="ui-timepicker-minutes"&gt; &lt;div class="ui-timepicker-header ui-widget-header ui-helper-clearfix ui-corner-all"&gt; &lt;div class="ui-timepicker-title"&gt;Minutes&lt;/div&gt; &lt;/div&gt; &lt;table class="ui-timepicker"&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload