How to align HTML dev tags in Horizontally (in a same line) using CSS

The following image will describe the scenario what i am going to explain further

divalign

use the following code to create the above scenario using CSS and HTML

</pre>
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.container
{
float: left;
clear: none;
height : 140px;
width : 720px;
background-color:yellow;

}
.left
{
height : 100px;
width : 200px;
background-color:blue;
float: left;
clear: none;
text-align:center;
margin:20px;
}
.middle
{
height : 100px;
width : 200px;
background-color:green;
float: left;
clear: none;
text-align:center;
margin:20px;
}
.right
{
height : 100px;
width : 200px;
background-color:red;
float: left;
clear: none;
text-align:center;
margin:20px;
}
</style>
</head>
<body>
<div>
<div> left</div>
<div> middle</div>
<div>rght</div>
</div>
<br/><br/><br/><br/><br/><br/><br/><br/><br/>
<p>Visit for more : http://futuredev.info/ </p>
</body>
</html>
<pre>

Leave a Reply

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

Current month ye@r day *