HTML CSS examples for CSS Widget:Header
Vertically align elements in header div with text and logo
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #headline { <!--from www . java 2 s. co m--> overflow: hidden; height: 224px; text-align: left; padding: 0px 80px 0px 80px; background-color: #CCC; display:flex; align-items:center; justify-content:space-between; } #headertext { font-size: 20pt; color: #000000; font-weight: bold; } </style> </head> <body> <div id="headline"> <div id="headertext"> Some title <br> some more title text </div> <div id="logo"> <a href=""> <img src="https://www.java2s.com/style/demo/Opera.png" width="198px" height="120px"> </a> </div> </div> </body> </html>