harikrishnan.n0077 harikrishnan.n0077 - 3 months ago 11
HTML Question

Using a auto margin in css but want a minimum margin

I had checked Using a percentage margin in CSS but want a minimum margin in pixels?. It had how to implement a minimum margin when using percentage. But i am using

width:80%;
margin:5px auto;


How to set a minimum margin on the left side. i had used auto margin as per Reducing the space equally when resizing browser window

Thanks

Answer

If i saw your code & question may be you can write like this:

div{
 margin:5px 10% 5px 5%;
}

Check this for more http://jsfiddle.net/spVNu/1/

Comments