Friday 4 January 2013

single div with multiple classes

<!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>single div with multiple classes</title>
<style>
.box { width: 50px; height:30px; float: left; margin: 0 10px 10px 0; }
.red { color: red; background: pink; }
.blue { color: blue; background: blue; }
.green { color: green; background: green; }
.border { border: 5px solid black; }
</style>
</head>

<body>
<div class="red border box"></div>
<div class="blue border box"></div>
<div class="green border box"></div>
<div class="red box"></div>
<div class="blue box"></div>
<div class="green box"></div>
<div class="border box"></div>
</body>
</html>

single div with multiple classes

No comments:

Post a Comment

Do you think it could be useful for you? Share your thoughts with us!