Skip to content Skip to sidebar Skip to footer

Make The Left And Right Margins The Same Width

What is the way to make the left (large) margin as small as right? I know about CSS resets, but still cannot figure out the actual working way.
F

Solution 1:

Here:

body { background-color: rgb(255,205,205); }
p { padding-left: 10%; }
#quote { background-color: rgb(205,255,205); }

Solution 2:

Give a width to your div and set margin to auto

jsfiddle

body {  margin0;background-color: rgb(255,205,205);}
#quote {  margin:auto; width:95%; background-color: rgb(205,255,205); }

Solution 3:

Is this is what you want ?

body {background-color: rgb(255,205,205); }
#quote {margin: 01%; padding: 010%; background-color: rgb(205,255,205); }
p {margin: 01%; padding: 013%;}
<divid="quote">Foo</div><p>Foo</p>

Solution 4:

body {
background-color: rgb(255,205,205);
}
#quote {
margin: 0 auto;
width:90%
background-color: rgb(205,255,205);
padding-left:10%;
}
p{
margin-left:14%;
}

For Fiddle

Solution 5:

Add this to your style:

p {margin-left:16px;}

Post a Comment for "Make The Left And Right Margins The Same Width"