css display inline-block

html:

<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<title>title</title>
</head>
<body>
<div class="box1 boxes"></div>
<div class="box2 boxes"></div>
<div class="box3 boxes"></div>
<div class="box4 boxes"></div>
<div class="box5 boxes"></div>
</body>
</html>

css:

.boxes{
    display: inline-block;
    vertical-align: bottom; /* try "bottom" or "top" */
}
.box1{width:150px;height:100px;background-color:red}
.box2{width:130px;height:200px;background-color:blue}
.box3{width:170px;height:190px;background-color:yellow}
.box4{width:200px;height:200px;background-color:purple}
.box5{width:100px;height:100px;background-color:green}
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">