Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat css position: or overflow do you use for smaller screens/minimized screens?
    primarykey
    data
    text
    <p>What is the correct way to position elements in css for smaller screens/minimizing? If I don't use overflow, my site leaks onto whitespace and if i use overflow:hidden it's obviously no longer visible. I have most things positioned relatively to the document. Which overflow method or position do I use to let the user scroll to see the rest of the page if its minimized?</p> <p>css: </p> <pre><code> body { margin:0; padding:0; height:100%; width:100%; position:relative; overflow:auto; } #headr { background-image:url(../images/top%20bg.jpg); background-repeat:no-repeat; height:400px; width:100%; position:relative; z-index:-100; overflow:hidden; } #lgo { position:relative; margin-left:33%; margin-top:80px; min-height:inherit; } #nav { background-image:url(../images/nav%20bar.png); position:relative; top:0; margin-top:0px; width:100%; height:99px; } #listone { list-style-type:none; display:inline; margin-left:570px; top:25px; position:relative; overflow:hidden; } .navlist { display:inline; font-size:33px; padding:25px; color:#FFF; font-weight:bold; font-family:georgia; position:static; } #searchb { background-image:url(../images/search.png); background-repeat:no-repeat; width:500px; height:200px; position:relative; padding:0px; margin-left:1350px; margin-top:-80px; } #searchb form { display:inline; } #searchbar { background-color:transparent; border:0px; position:absolute; top:50px; left:60px; width:200px; height:80px; outline:none; font-size:24px; } .searchsubmit { border:0px; background-color:transparent; position:absolute; top:33px; left:200px; width:30px; height:40px; } </code></pre> <p>html:</p> <pre><code> &lt;div id="nav"&gt; &lt;ul id="listone"&gt; &lt;li class="navlist"&gt;Home&lt;/li&gt; &lt;li class="navlist"&gt;Portfolio&lt;/li&gt; &lt;li class="navlist"&gt;Prices&lt;/li&gt; &lt;li class="navlist"&gt;Contact&lt;/li&gt; &lt;/ul&gt; &lt;div id="searchb"&gt; &lt;form&gt; &lt;input type="text" id="searchbar" placeholder="Search"&gt; &lt;input type="image" class="searchsubmit" src="images/searchicon.png" value=""&gt; &lt;/form&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="headr"&gt; &lt;img src="images/head logo.png" id="lgo"&gt; &lt;/div&gt; </code></pre> <p>the search bar which are the last 3 ID's in the css, is the object that's too big for the screen. you can see here <a href="http://i.imgur.com/q4DasQ7.png" rel="nofollow">http://i.imgur.com/q4DasQ7.png</a></p>
    singulars
    1. This table or related slice is empty.
    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