Jump to content

Can anyone explain this to me ?


nODZ

Recommended Posts

So i'm doing stef's css course right now , and i love it , but there is one question that makes no sense to me. In chapter 4 The Box Model , lesson 7  calculate width  / question 3 there is a question that  goes like this :   Please update the margin on this div , so that it will fit into 400px. the code is  <div style="width: 300px; padding: 10px; border: 0px; margin:">. So on margin i added 15px , the way i see it width is 300px + padding 40 (10x4) so i thought we need 60px (4x15) to make it 400px , but the answer says 40px is the correct answer ,  dont get why?

Edited by nODZ
Link to comment
Share on other sites

...also,  even if you needed to include tja padding, you would only consider the right and left, not top and bottom. And I jut see the answer should be 40.....  why is that? (It’s been a while for me, what am I overlooking?)

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...