Jump to content

css padding issue


divinedesigns1

Recommended Posts

can someone tell me why everytime i add padding to a div with a width of say 100% or 80% the div expand....i thought padding was suppose to be for within the div and not suppose to expand that div or element.

Link to comment
Share on other sites

That means you don't understand the box model. Here's an explanation: http://www.w3schools.com/css/css_boxmodel.asp

 

You can change the way the box model works using the box-sizing property, it's supported in Internet Explorer 9 and above. If you need to support Internet Explorer 8 you will have to use the classic box model.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...