Change Ul Li From Horizontal To Vertical June 27, 2023 Post a Comment I am trying to do a Menu that will appear when Window width is resized to a small resolution. Below is the HTML and CSS are below Solution 1: nav{ position:relative; } nav ul { position:absolute; top:40px; /* this height is same as the menu.png */ left:0; z-index:999; list-style:none; } nav li{ list-style:none; display:block; } nav ul li a{ display:block; } nav li:not(:first-child) > :only-child, nav ul > :first-child a{ text-decoration:none; font-size:1.4em !important; outline:1px solid blue; padding:8px; letter-spacing:0.9px; margin-left:18px; } nav li:not(:first-child) > :only-child{ color:blue; } nav ul > :first-child a{ color:white !important; background:blue; }Copy <nav> <a id="menu-dropdown"><img src="http://localhost/influenza/logo/menu.png" /></a> <ul> <li><a class="tab-click" href="http://localhost/influenza/index.php">Home</a></li> <li><a href="http://localhost/influenza/articles.php">Articles</a></li> <li><a href="http://localhost/influenza/webinars.php">Webinars</a></li> </ul> </nav>Copy Share Post a Comment for "Change Ul Li From Horizontal To Vertical"
Post a Comment for "Change Ul Li From Horizontal To Vertical"