html - CSS Box-Model/ width set up -


i taking mta certification test on monday, using measureup's practice test html app development practice exam, 1 of questions, have no clue how answer question, (in pixels):

  margin 5;   border-width 5;   padding 20;   outline-width 5;   width 470; 

which 2 css properties can set 10px total box model width set 500px?

the actual answers: margin , border-width how answer?

answers:

margin, border-width, outline-width, padding

outline-width , border-width

the width of dom element equal to:

width + padding + border 

margin not included.

besides, setting padding 10px not make element's width 500px

you might want read on box model.


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -