HTML CSS examples for CSS Widget:UL Element
Show list-items in div without using negative margins
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> * { margin:0px auto; padding:0px; } div#header<!--from www . j a v a2 s .com--> { background:Chartreuse; box-shadow:0px 6px 6px yellow; position:relative; } div#header>span#websiteName { font-family:TEMPUS SANS ITC; font-size:45px; font-weight:bold; color:blue; margin-left:19%; } ul.nav { list-style:none; position:absolute; top:29px; right:0px; } ul.nav li { width:100px; float:right; display:inline; } ul.nav li a { display:block; width:100px; color:pink; float:left; } </style> </head> <body> <div id="header"> <span id="websiteName">Lorem ip</span> <div id="languageBar"> <ul class="nav"> <li> <a href="#">Lorem i</a> </li> <li> <a href="#">Lorem</a> </li> <li> <a href="#">Lorem i</a> </li> <li> <a href="#">Lorem ip</a> </li> </ul> </div> </div> </body> </html>