vertical-align: text-bottom and image : img align « Tags « HTML / CSS






vertical-align: text-bottom and image

     
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title></title>
<style type="text/css" media="Screen">
div {
  font-size: 60px;
  line-height: normal;
  border: 1px solid black;
}

* .text {
  font-size: 18px;
}

* .text-bottom {
  vertical-align: text-bottom;
}

</style>
</head>
<body>
<div>
    <img class="text-bottom" src="http://www.java2s.com/style/logo.png" alt="bar" />
    <span class="text-bottom text"> text-bottom</span>
</div> 
</body>
</html>

   
    
    
    
  








Related examples in the same category

1.Image vertical align 20px
2.vertical align 100 percent image
3.Vertical-align: baseline with image
4.image vertical align middle
5.image vertical align bottom
6.'align' specifies how the element is aligned with adjacent text