HTML CSS examples for CSS Layout:Text
Align the text to the bottom of its container
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #navigation {<!--from w w w .ja v a 2s. c om--> width:100%; height:51px; clear:both; color:Chartreuse; background:yellow; background:-moz-linear-gradient(top, blue 0%, pink 50%, WhiteSmoke 51%, OrangeRed 100%); background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,grey), color-stop(50%,BlueViolet), color-stop(51%,Chartreuse), color-stop(100%,yellow)); } #navigation ul { margin:0 auto; width:auto; padding:0; } #navigation ul li { position:relative; display:inline-block; color:blue; font:13px Verdana, Geneva, sans-serif; padding:0 26px; background:url('http://www.java2s.com/style/demo/Google-Chrome.png') no-repeat center top; width:100px; height:51px; } #navigation ul li a { position:absolute; top:31px; display:inline-block; color:pink; font:13px Verdana, Geneva, sans-serif; text-decoration:none; height:51px; } </style> </head> <body> <div id="navigation"> <ul> <li> <a href="#">ter</a> </li> <li> <a href="#">redg</a> </li> <li> <a href="#">ryer More</a> </li> <li> <a href="#">More</a> </li> </ul> </div> </body> </html>