HTML CSS examples for CSS Widget:Image Align
Aligning logo image with navigation bar
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .navigation {<!-- ww w . ja va 2s. c o m--> width:100%; text-align:center; background-color:Chartreuse; vertical-align:bottom; line-height:121px; height:121px; } #nav-list { margin:0 auto; list-style-type:none; } #nav-list li { display:inline-block; font-size:19px; margin:21px; vertical-align:bottom; line-height:normal; } .logo-img { position:absolute; left:11px; top:11px; margin:0px 16px 16px 0px; } </style> </head> <body> <div class="navigation"> <p> <img class="logo-img" src="https://www.java2s.com/style/demo/Opera.png" alt="Logo"> </p> <ul id="nav-list"> <li> <a href="">Home</a> </li> <li> <a href="">News</a> </li> <li> <a href="">Contact</a> </li> <li> <a href="">About</a> </li> </ul> <p></p> </div> </body> </html>