Samar Yadav Samar Yadav - 1 year ago 93
CSS Question

Add margin on both sides of free space(background) in Html - css page

I am trying to add margin on both sides of free space in Html. and fill background in the middle remaining part only.

But this id doesn't work when i put it in body tag.

display: block;
margin-left: 100px;
margin-right: 100px;
background-color: #E3EAEA;

above given colors are random. Result should be like this.

capture[![this should be the result]1

Thanks for helping.

Answer Source

Just make body white and add a container div. Like here:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download