HTML CSS examples for CSS Layout:Text
Aligning text to bottom in parent container
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #header ul {<!-- w ww . j a va2 s .c om--> margin-bottom:0px; } #header { top:0px; width:100%; padding-top:21px; padding-bottom:0px; background-color:Chartreuse; border-bottom:3px solid yellow; text-align:center; margin-bottom:0px; } img#logo { margin-left:auto; margin-right:auto; margin-bottom:21px; } #nav ul li { list-style-type:none; display:inline; margin-bottom:0px; padding-bottom:0px; padding-right:21px; font-size:21px; } #nav ul li a { color:blue; text-decoration:none; border-bottom:3px solid pink; } body { margin:0px; padding:0px; background-color:WhiteSmoke; } </style> </head> <body> <div id="header"> <img id="logo" src="https://www.java2s.com/style/demo/Opera.png"> <div id="nav"> <ul> <li> <a href="#">Home</a> </li> <li> <a href="#">About</a> </li> <li> <a href="#">Contact</a> </li> </ul> </div> </div> </body> </html>