HighDots Forums  

padding and margin BOTH add to the div's width and height

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss padding and margin BOTH add to the div's width and height in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Summercool
 
Posts: n/a

Default padding and margin BOTH add to the div's width and height - 10-28-2007 , 06:23 AM






i never knew that when we specify

style="width: 600px; padding: 100px; margin: 80px; border-width: 60px"

all the padding, margin, and border ADD TO the 600px...
so the whole area essentially becomes 600px + (100 + 80 + 60) x 2 =
1080px

at first I thought the padding goes inside the width of 600px and
makes the area inside for display only 400px.

an example is at

http://www.0011.com/test_size3.html


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.