HTML CSS examples for CSS Layout:Absolute Position
Make Absolute positioning multiple elements and floating right
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #izmenu {<!-- w w w. j a v a 2s . c o m--> position:relative; float:right; } #izmenu ul { margin:0 0 0 0; padding:0 0 0 0; list-style:none; display:inline-block; vertical-align:top; position:absolute; width:auto; } #one { right:0 } #two { right:61px; } #izmenu ul li { padding:0 0 0 0; margin:0 0 0 0; } #izmenu a { background-color:Chartreuse; text-decoration:none; padding:11px 16px 11px 16px; display:block; text-align:center; color:yellow; margin:0 0 0 0; } </style> </head> <body> <div id="izmenu"> <ul id="one"> <li class="menu-heading"> <a href="#">home</a> </li> </ul> <ul id="two"> <li class="menu-heading"> <a href="#">login</a> </li> <li> <a href="#">settings</a> </li> <li> <a href="#">logout</a> </li> </ul> </div> </body> </html>