HTML CSS examples for CSS Layout:Float
Aligning and floating nav bar to the right
<html lang="en"> <head> <style type="text/css"> body<!-- w ww .jav a 2s . c o m--> { font:normal 301 .9em 'Open Sans', sans-serif; overflow-x:hidden; } div { float:left; width:100%; background-color:Chartreuse; } ul { float:right; background-color:yellow; height:21px; } li { float:left; } ul a { color:blue; padding:0 11px; text-decoration:none; } ul a:hover { color:pink; } </style> </head> <body> <div> <ul> <li> <a href="index.html">Home</a> </li> <li> <a href="company.html">Company</a> </li> <li> <a href="team.html">Management Team</a> </li> <li> <a href="contact.html">Contact</a> </li> </ul> </div> </body> </html>