Jump to content

CSS question about block elements?


Recommended Posts

I'm really confused and I can't find anywhere in my book that could help me find the answer to this question for my homework:
You have a block element stacked on top of another block element. The upper one has a margin of 30, and the lower one has a margin of 10. How will the browser render them?
A. It will use the value of the element with the smallest margin, effectively placing a margin of 10 pixels between the two elements.
B. It will use the value of the element with the largest margin, effectively placing a margin of 30 pixels between the two elements.
C. It will default to the first element listed, which in this case was 30, effectively placing a margin of 30 pixels between the two elements.
D. It will combine the margins, effectively placing a margin of 40 pixels between the two elements.
Can anyone help me out?
Link to post
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.

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...