divinedesigns1 Posted September 22, 2015 Share Posted September 22, 2015 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 More sharing options...
Ingolme Posted September 22, 2015 Share Posted September 22, 2015 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now