Advertisement
makispaiktis

Codecademy - 12th Exercise (Instructions)

Oct 9th, 2019 (edited)
482
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. Mark the tasks as complete by checking them off
  2. 1.
  3. You’ll go through Davie’s Burger’s menu item roughly from top to bottom. Let’s begin with styling the <nav> element containing the logo and navigation elements.
  4.  
  5. Set the width of the img to 180 pixels.
  6. Center the img horizontally using the margin property.
  7. 2.
  8. Set margin of span elements inside the nav to 10 pixels on the top and bottom, and 0 pixels on the left and right.
  9.  
  10. 3.
  11. Now set some rules for the element with the class content. This element is a container for all the elements not included in <nav>.
  12.  
  13. Set the height to 500 pixels.
  14. Create 10-pixel vertical margins and automatic horizontal margins.
  15. Set .body elements inside .content to have no vertical margin and automatic horizontal margins so that it is centered.
  16. 4.
  17. With a 500-pixel height for .content, some elements will overflow out of its box if the browser window is made too small.
  18.  
  19. Make .content scrollable with the overflow property.
  20. Resize the browser window so it is very skinny and notice that this section is now scrollable.
  21. 5.
  22. Now it’s time to tackle the .header and its h1 text: ‘BBQ BACON BURGER’.
  23.  
  24. Set the height of the .header class to 320 pixels.
  25. Create a 20-pixel padding for the h1 element inside the .header.
  26. Set vertical margins to 0 pixels and the horizontal margins to be determined automatically for the same h1 element.
  27. 6.
  28. Now add some box-model formatting to the ‘ORDER NOW’ .button element. As you make each change, make sure to scroll down if necessary to view the effect on the button.
  29.  
  30. Set the width to 200 pixels.
  31. Set the padding to 20 pixels.
  32. Set the vertical margins to 40 pixels and the horizontal margins to automatic.
  33. Give the button a 1-pixel, solid, blue border.
  34. 7.
  35. Finally, style the nutrition facts section at the bottom. In the element selected with ul.nutrition:
  36.  
  37. Set the padding of the ul.nutrition element to 20 pixels.
  38. Set the width of li elements within the ul.nutrition to 200 pixels.
  39. Set a 10-pixel vertical padding and 20-pixel horizontal padding to the same elements.
  40. Add a 3-pixel bottom margin to the same elements.
  41. 8.
  42. Good job—this menu item is looking great, and the layout and spacing is much more readable. If you’d like, you can continue refining the design or add your own spin!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement