Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to position a fixed element next to a centered container
    primarykey
    data
    text
    <p>I want to position my fixed menu-bar just next to my centered container, but its position is relative to the view port and not to the container, so I am having problems keeping it next to the container.</p> <p>What is the easiest/cleanest way to position a fixed element next to the container?</p> <p>Here's my test: <a href="https://dl.dropbox.com/u/10378684/index.html" rel="nofollow">https://dl.dropbox.com/u/10378684/index.html</a></p> <p><strong>HTML :</strong></p> <pre><code>&lt;div id="container"&gt; &lt;header&gt; &lt;hgroup&gt; &lt;h3&gt;TIA1&lt;/h3&gt; &lt;h1&gt;Contreformes&lt;/h1&gt; &lt;/hgroup&gt; &lt;/header&gt; &lt;nav&gt; &lt;ol&gt; &lt;li&gt;&lt;a href="#"&gt;Grilles&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Contreformes&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Ligne de base&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/nav&gt; &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit. Esse veritatis non autem blanditiis quo rerum sint quasi architecto quibusdam rem. Quibusdam dolores aliquid eum qui impedit architecto ipsum repellendus illum!&lt;/p&gt; &lt;/div&gt; </code></pre> <p><strong>CSS :</strong></p> <pre><code>* { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; } body { background: black; color: white; font-size: 100%; font-family: "adelle", Helvetica, serif; } a { color: white; text-decoration: none; display: block; width: 100%; margin-bottom: 0px; font-size: 16px; text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8); padding: 8px ; border-bottom: 2px solid black; -webkit-transition: all 0.1s ease-out; -moz-transition: all 0.1s ease-out; -o-transition: all 0.1s ease-out; -ms-transition: all 0.1s ease-out; transition: all 0.1s ease-out; } a:hover { background: rgba(223, 207, 191, 0.4); padding-left: 10px; } ol { color: rgba(223, 207, 191, 0.8); position: relative; list-style-position: inside; padding: 0px; width: 139px; font-size: 14px; background: rgba(223, 207, 191, 0.15); position: relative; float: left; } #container { position: relative; margin: 0 auto; width: 960px; background: rgba(34, 34, 34, 1.0); height: 900px; } h1, h3 { text-align: center; font-weight: normal; margin: 0px; } h3 { padding-top: 15px; } h1 { padding-bottom: 35px; } </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.
    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