Note that there are some explanatory texts on larger screens.

plurals
  1. POMenu goes out of the screen but page stays unable to scroll
    primarykey
    data
    text
    <p>I'm working on a website, and I've encountered a problem for which I cannot find any kind of solution online, so I'd appreciate your help.</p> <p>I've designed a drop-down menu, and this is the problem: if the page is zoomed in, it breaks into 2 lines (not desired as it's a drop-down menu!), but if I set a minimum-width for the menu, as the position is set to absolute, I cannot scroll to the right and the menu just goes out of the screen. It doesn't work neither if I set a minimum-width for the body tag, as it allows me to scroll the body but the menu stays out! It's frustrating</p> <p>The position must be kept to absolute, otherwise I'd need a whole method to keep it on top and would appreciate your help, so I'm looking for a solution that let's me scroll to the right if the screen is really zoomed in, as in smartphones.</p> <p>Here's the menu code (not all of it ofc, as it's too long, but the main parts. To see more, ask for it or visit the page and see the source code).</p> <p>Website: <a href="http://newfutureuniversity.org/" rel="nofollow">http://newfutureuniversity.org/</a></p> <p>HTML:</p> <pre><code>... &lt;body&gt; &lt;div id="container"&gt; &lt;div class="menu" &gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://newfutureuniversity.org/"&gt;New Future&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://newfutureuniversity.org/learn/degree/"&gt;Learn&lt;/a&gt; &lt;ul class="bottom"&gt; ... &lt;/ul&gt; &lt;/li&gt; ... </code></pre> <p>CSS:</p> <pre><code>body /* Changes the style for the whole body */ { position:absolute; margin:0px; /* Avoids margin in the whole page */ padding:0px; border:0px; background-color: #EEEEEE; /* Default background color, light grey */ height:100%; /* Vertically complete */ width:100%; min-width:400px; min-height: 100%; color: #333; /* Letters color */ } #container /* The container has the header, main and footer inside */ { position:relative; margin:0px; padding:0px; min-height: 100%; /* Avoids the footer to go up */ height: auto !important; height: 100%; margin: 0px auto -51px; } .menu { position: fixed; top:0px; left:0px; opacity:0.3; filter:alpha(opacity=30); /* For IE8 and earlier */ width:100%; min-width:400px; border:none; border-bottom:1px solid gray; margin:0px; padding:0px; font-size:18px; z-index:3; } .menu ul { background:#DDD; height:26px; list-style:none; margin:0px; padding:0px; z-index:3; } .menu li{ width:24.5%; min-width:93px; float:left; padding:0px; margin: 2px 0px 2px 0.5%; } ... </code></pre> <p>EDIT: You need to unmaximize and to zoom to see the problem in a desktop browser.</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