Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to correctly style drop-down menu
    primarykey
    data
    text
    <p>I ran into problems while styling drop-down menu. Everything is working fine but I have absolute positioning in my CSS (which works) but it of course doesn't work properly when I change my screen resolution. I am more programmer a then designer so I would to ask for some help with this:-) Here is my menu</p> <pre><code>&lt;div class="navigation"&gt; &lt;!-- some links --&gt; &lt;div id="menu"&gt; &lt;a href="gallery.html"&gt;Galerie&lt;/a&gt; &lt;div id="submenu"&gt; &lt;a href="galleryOldRooms.html" title="Starší pokoje"&gt;Starší pokoje&lt;/a&gt;&lt;br /&gt; &lt;a href="galleryNewRooms.html" title="Novější pokoje"&gt;Novější pokoje&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>And here is the relevant CSS</p> <pre><code>#submenu { display: none; padding: 0px; margin-top: 5em; margin-left: 27.5em; position: absolute; left: 0px; } .nav a { border-right: 2px solid #161616; color: #CCC; float: left; font: bold 1em Verdana,sans-serif; line-height: 51px; padding: 0 20px; } </code></pre> <p>And piece of JQuery which does the drop out</p> <pre><code>$(document).ready(function() { $("#menu").hover(function() { $("#submenu").fadeIn(); }, function() { $("#submenu").fadeOut(); }); }); </code></pre> <p>How can I improve this to be it more browser and resolution independent?Thanks for answers!</p> <p><strong>EDIT</strong> When I increase or decrease resolution of my display or try to look at it on bigger screen, the the drop-down menu is moved to either left or right side depending on the resolution. Which is obviously something I don't. <a href="http://www.stavarov-ubytovna.cz" rel="nofollow">Here</a> is the link, it's not finished so don't be mean to me:-)</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.
 

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