
How can i indent

You need to wrap it in another div. For example, make the outer div margin: 0 auto; and the inner div margin-left: 50px
That will indent its left margin by 50 pixels from the middle.
Indent div in css
<html>
<head>
<title>Indent div in css</title>
<style>
#outer {
margin: 0 auto;
width:200px;
background-color:red;
}
#inner {
/*move the whole container 50px to the left side*/
margin-left:-50px;
margin-right:50px;
/*or move the whole container 50px to the right side*/
/*
margin-left:50px;
margin-right:-50px;
*/
}
</style>
</head>
<body>
<div id="outer">
<div id="inner">
This is the result!
</div>
</div>
</body>
</html>
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.