Advertisement
HristovJ

universal selector

Dec 30th, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.71 KB | None | 0 0
  1. One selector to rule them all
  2.  
  3. There's also a very special selector you can use to apply CSS styling to every element on the page:
  4. the * selector. For example, if you type
  5.  
  6. * {
  7.    border: 2px solid black;
  8. }
  9. You'll create a two-pixel wide solid black border
  10. around every element on the HTML page.
  11.  
  12. Instructions
  13. Go ahead and use the universal selector to put a 1px dashed #3A5FCD border around every element on the page.
  14. See how each element looks like it's in its own box on the page? This is part of the HTML/CSS "box model,"
  15. which we'll cover in the next lesson.
  16.  
  17. ?
  18. Hint
  19. #3A5FCD is a hexadecimal color for blue. It is often helpful to use hex colors instead of
  20.  just words when you want a very specific color.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement