HTML CSS examples for CSS Widget:Header
Align image and text to the top in header
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> header {<!-- w w w .j a v a 2 s.com--> margin: 0; padding: 0; width: 100%; height: 100px; background-color: orange; } ul { list-style-type: none; } .ul-inline li { display: inline; margin: 45px; } .pull-right { float: right; } .pull-left { float: left; } .logo { width: 50px; } </style> </head> <body> <header> <nav> <ul class="pull-right ul-inline"> <li>1</li> <li>2</li> <li>3</li> </ul> <ul class="pull-left"> <li> <img src="https://www.java2s.com/style/demo/Opera.png" class="logo" alt="Dell Logo"> </li> </ul> </nav> </header> </body> </html>