How how to make <a> text align bottom? I have added height = line-height, and vertical-align:bottom; but the text still in the middle of the div. How to do? Thanks
Test in http://jsfiddle.net/BanAz/
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
#layer{width:198px;height:48px;line-height:48px;border:1px #000 solid;vertical-align:bottom;}
#layer a{text-decoration:none;}
</style>
</head>
<body>
<div id="layer">
<a href="#">menu</a>
</div>
</body>
</html>
Options include:
line-height: 48pxand adddisplay: table-cellto#layer:http://jsfiddle.net/jgQ9k/1/
Note that this won’t work for IE7, because
display: table-cellisn’t supported.line-height: http://jsfiddle.net/jgQ9k/2/And the method I would actually use:
position: relativeto#layer, andposition:absolute; bottom:0to#layer a:http://jsfiddle.net/jgQ9k/3/