Adding padding to HTML elements - IE, FF, Chrome etc.

Posted by NLV on Stack Overflow See other posts from Stack Overflow or by NLV
Published on 2010-06-18T09:57:04Z Indexed on 2010/06/18 10:03 UTC
Read the original article Hit count: 213

Filed under:
|
|

Hello

I've a doubt. Lets consider that we have a div of width 200px. If i add the following the style

style="padding-left:10px; padding-right:10px"

to the element what happens actually? Will the total width of the div increases to 220px with 10px at the left (for left padding), original width 200px at the middle and 10px at the right (for right padding)?

Or will it takes the padding space from the 200px and becomes (10px + 180px + 10px)?

Does the above rendering differs for each browser (especially IE and FF)?

Thank you

NLV

© Stack Overflow or respective owner

Related posts about html

Related posts about css