Monday, June 25, 2018
Positioning of DIV in HTML and CSS | How to use float in css | Learn HTML5
This video demonstrate the positioning of div in html and css, this video show how we can use float attribute in css.
code:
<!DOCTYPE html>
<html>
<head>
<title>Positioning in HTML and Css</title>
<style type="text/css">
#firstdiv {
background-color: blue;
color:white;
text-align: center;
width:400px;
height:100px;
margin:5px;
float:right;
}
#seconddiv {
background-color: green;
color:white;
text-align: center;
width:400px;
height:100px;
margin:5px;
float:right;
}
#thirddiv {
background-color: red;
color:white;
text-align: center;
width:400px;
height:100px;
margin:5px;
float:right;
}
</style>
</head>
<body>
<div id="firstdiv"> First Div </div>
<div id="seconddiv"> Second Div </div>
<div id="thirddiv"> Third Div </div>
</body>
</html>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment