Advertisement
Guest User

Untitled

a guest
Sep 26th, 2016
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.95 KB | None | 0 0
  1. <style type="text/css">
  2. body /* write an element selector that targets all body elements */
  3. {margin:0;
  4. padding:0;
  5. background-color: #CCC;
  6. font-family:Arial, Helvetica, sans-serif;
  7. }
  8. #wrapper /* write an id selector that targets all wrapper elements */
  9. {margin:10px;
  10. padding:0;
  11. width:1000px;
  12. height:750px;
  13. }
  14. #header /* write an id selector that targets all header elements */
  15. {width:990px;
  16. height:90px;
  17. background-color:#990033;
  18. margin:0;
  19. padding:5px;
  20. }
  21. #sideBar /* write an id selector that targets all sideBar elements */
  22. {width:200px;
  23. height:650px;
  24. margin:0;
  25. padding:0;
  26. background-color: #ffb310;
  27. float:left;
  28. }
  29. .contact /* write an class selector that targets all contact elements */
  30. {width:190px;
  31. height:auto;
  32. margin:0;
  33. padding:5px;
  34. background-color:#990033;
  35. color:#FFFFFF;
  36. }
  37. ul /*write a child selector that targets all unordered lists with list items*/
  38. {list-style:none;
  39. }
  40. #mainContent /* write an id selector that targets all mainContent elements */
  41. {width:790px;
  42. height:640px;
  43. background-color:#fff;
  44. float:right;
  45. margin:0;
  46. padding:5px;
  47. }
  48. #header > h1 /* write an descendent selector that targets all heading one's in the ID of header */
  49. {font-size:2.5em;
  50. color: #FFFFFF;
  51. }
  52. span.year/* write an element-specific selector that targets all span's in the class year */ /* don't you mean all spans with the class year? */
  53. {color:#ffb310;
  54. }
  55. p, q/* write an group selector that targets all paragraph and quote elements */
  56. {font-size:1em;
  57. color:#666666;
  58. }
  59. q /* write an element selector that targets all quote tags */
  60. {font-style:italic;
  61. }
  62. h1
  63. {font-size:2em;
  64. color:#000000;
  65. }
  66. h2 /* write an element selector that targets all heading two tags */
  67. {font-size:1.5em;
  68. color:#000000;
  69. }
  70. a /* write an element selector that targets the hyperlinks */
  71. {font-weight:bold;
  72. text-decoration:underline;
  73. color:#FFB310;
  74. font-size:1em;
  75. }
  76. h1 + p /* write an adjacent selector that targets paragraph tags that follow heading one tags */
  77. {color:#FFB310;
  78. }
  79. span[class="year"] /* span.year is better */ /* write an attribute selector that targets span tags with the class of year */
  80. {font-size:1.25em;
  81. }
  82. /* write an element-specific selector that targets all unordered lists with the class nav --*/ /* wtf this is only possible in css4 */
  83. ul {margin-bottom: 15px;
  84. margin-left:0;
  85. }
  86. ul.nav li
  87. {margin-bottom:2px;
  88. }
  89. .nav ul > a /* write an element-specific selector that targets unordered lists in the class nav with a descendent selector targeting hyperlinks */
  90. {padding: 5px 5px 5px 15px;
  91. display: block;
  92. width: 100px;
  93. text-decoration: none;
  94. background:#990033;
  95. color:#ffffff;
  96. }
  97. ul.nav a:hover, ul.nav a:active
  98. {background:#ffffff;
  99. color: #000;
  100. }
  101. a:visited/* write an dynamic pseudo-class selector targeting hyperlinks in the visited link state */
  102. {color:#CCCCCC;
  103. }
  104. h1 + p::first-letter/* write an pseudo-element selector targeting the first letter of a paragraph that adjacently follows a heading one tag */
  105. {font-size:2em;
  106. }
  107. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement