title: IE7, floated element, content wrapping, bug?
body: <p>I am hoping someone has experienced something similar to this and can point me in the right direction as it is driving me nuts.</p>
  
  <p>I have the following code set up (I'm sorry I can't supply a test link) and it displays great in FF, Chrome, IE8 but in IE7 and IE6 I am experiencing a weird float/wrapping issue.</p>
  
  <p>It appears, for no apparent reason, the h1 tag and h2 tag, although no width is set, is being wrapped.</p>
  
  <pre><code>&lt;div style="width:900px; margin:0 auto;"&gt;
  
  &lt;h1 style="float:left; background:#ccc"&gt;a long title with background behind text&lt;h1&gt;
  &lt;h2 style="float:left; background:#ccc"&gt;a longer sub title that also has a background behind text.&lt;h2&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>which is displaying like:</p>
  
  <p>a long title with background<br />
  behind text</p>
  
  <p>and </p>
  
  <p>a longer sub title that also has a<br />
  background behind text.</p>
  
  <p>If I remove the float, the background color spans the entire width (which I don't want) but the text no longer wraps.</p>
  
  <p>Anyone have any ideas?</p>
  
  <p>::edit::</p>
  
  <p>Here is some additional information/screenshots.</p>
  
  <p>The following graphic shows the two displays. the top is how it shows in IE6, IE7, and IE8 using Document Mode: IE7 Standards.</p>
  
  <p>The bottom is FireFox, IE8 normal mode, Chrome</p>
  
  <p><a href="http://awesomescreenshot.com/0a4en0paa" rel="nofollow">http://awesomescreenshot.com/0a4en0paa</a></p>
  
  <p>In my troubleshooting I have determined that the line that wraps is influenced by the line above it. Example: if the crumb is long, the title will have a short wrap, if the crumb is small, the title may not wrap at all.</p>
  
  <p>If I make the <p> display:inline the title will display correctly but the sub title will wrap based on the length of the title. Also making it an inline element ruins the padding around the text.</p>
  
  <p>Actual code:</p>
  
  <pre><code>&lt;div id="hero" style="background:url(images/bg-hero.jpg) center top no-repeat;"&gt;
      &lt;div class="panel-content"&gt;
          &lt;p style="background:rgb(0,100,175); background:rgba(0,100,175,.6);"&gt;this / is / a bread / crumb / trail / which seems to influence the following item's width&lt;/p&gt;
          &lt;h1 style="background:rgb(0,100,175); background:rgba(0,100,175,.7);"&gt;Title of the page which should span the width&lt;/h1&gt;
          &lt;h2 style="background:rgb(0,100,175); background:rgba(0,100,175,.6);"&gt;sub title which should behave the same way and span the availble width&lt;/h2&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>#hero { position:relative; z-index:0; color:#fff; width:100%; min-width:1024px; margin:0 0; overflow:hidden; height:238px; background:url(images/bg-hero-default.jpg) center top no-repeat }
  #hero .panel-content {  width:978px; min-width: 978px; margin:0 auto; padding:35px 23px 0; position:relative; }
  #hero p { float:left; font-size:1.5em; line-height:1.6em; padding:0 5px; margin:0 0 5px; }
  #hero h1 { float:left; clear:both; font-size:4em; padding:0 5px 3px; margin: 0 0 3px; color:#fff; line-height:1em; }
  #hero h2 { float:left; clear:both; font-size:2em;  padding:0 5px 3px; margin:0 0 3px; }
  </code></pre>