HTML CSS examples for CSS Widget:Nav bar image
To place a logo next to navigation bar
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> html,body { margin:0; } ul {<!-- w w w .j a va2 s .co m--> list-style-type:none; margin:0; padding:0; overflow:hidden; background-color:Chartreuse; } ul img { height:51px; float:left; } li { float:left; } li a { display:block; color:yellow; text-align:center; padding:15px 17px; text-decoration:none; } li a:hover { background-color:blue; } </style> </head> <body> <nav> <ul> <img src="https://www.java2s.com/style/demo/Firefox.png" alt=""> <li> <a href="#">Lorem</a> </li> <li> <a href="#">Lorem</a> </li> </ul> </nav> </body> </html>