Displaying div elements in a single row

Manideepgoud
Posted by Manideepgoud under CSS 3 category on | Points: 40 | Views : 319
Here we have taken three div elements With values DOTNETFUNDA, TECHFUNDA and ITFUNDA which appears the output as step by step values, To display three div elements in a single line we have to use
float:left;
property which makes the output to appear in a single line.

<style>
div {
width: 30%;
height: 50px;
border: 1px solid green;
float: left;
}
</style>
</head>
<body>
<div>DOTNETFUNDA</div>
<div>TECHFUNDA</div>
<div>ITFUNDA</div>
</body>

Comments or Responses

Login to post response