Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Use position:relative on the header (as has already been suggested) so that it becomes a layer, then the absolutely positioned elements inside it will use that element as origin.</p> <p>You can place the line before the logo in the markup, then you don't need to use z-index to put the logo on top of the line. All browsers doesn't handle z-index the same...</p> <p>By placing the title to the right, it will expand to the left as needed.</p> <p>Use a top border instead of a bottom border on the line, that elliminates the problem with IE wanting to make the element at least one character high.</p> <p>I removed some unneccesary styles, and added a title to the page (as that is required in a proper html document).</p> <p>This will display consistently in Firefox 3, IE 7, IE 8, Opera 9 and Chrome 1:</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; &lt;html xmlns="http://data.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;title&gt;Title&lt;/title&gt; &lt;style type="text/css"&gt; body { margin: 0; padding: 10px; } #headerArea { position: relative; background: yellow; margin: 0 auto; width: 760px; height: 150px; } #headerArea div { position: absolute; } #logo { top: 20px; left: 20px; background: orange; text-align: center; font-size: 32pt; width: 150px; padding: 10px; } #menu { top: 20px; right: 20px; background: tomato; text-align: center; font-size: 14pt; width: 240px; padding: 10px; } #line { top: 80px; left: 20px; width: 720px; border-top: 1px solid blue; } #title { top: 90px; right: 20px; font-style: italic; font-size: 14pt; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="headerArea"&gt; &lt;div id="line"&gt;&lt;/div&gt; &lt;div id="logo"&gt;LOGO&lt;/div&gt; &lt;div id="menu"&gt;One Two Three Four Five&lt;/div&gt; &lt;div id="title"&gt;This is the Title a Bit Longer&lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>(You may need to adjust the positioning to get it exactly as you want, but that should be quite easy.)</p>
    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.
    1. This table or related slice is empty.
    1. VO
      singulars
      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