Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style type="text/css">
- body /* write an element selector that targets all body elements */
- {margin:0;
- padding:0;
- background-color: #CCC;
- font-family:Arial, Helvetica, sans-serif;
- }
- #wrapper /* write an id selector that targets all wrapper elements */
- {margin:10px;
- padding:0;
- width:1000px;
- height:750px;
- }
- #header /* write an id selector that targets all header elements */
- {width:990px;
- height:90px;
- background-color:#990033;
- margin:0;
- padding:5px;
- }
- #sideBar /* write an id selector that targets all sideBar elements */
- {width:200px;
- height:650px;
- margin:0;
- padding:0;
- background-color: #ffb310;
- float:left;
- }
- .contact /* write an class selector that targets all contact elements */
- {width:190px;
- height:auto;
- margin:0;
- padding:5px;
- background-color:#990033;
- color:#FFFFFF;
- }
- ul /*write a child selector that targets all unordered lists with list items*/
- {list-style:none;
- }
- #mainContent /* write an id selector that targets all mainContent elements */
- {width:790px;
- height:640px;
- background-color:#fff;
- float:right;
- margin:0;
- padding:5px;
- }
- #header > h1 /* write an descendent selector that targets all heading one's in the ID of header */
- {font-size:2.5em;
- color: #FFFFFF;
- }
- 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? */
- {color:#ffb310;
- }
- p, q/* write an group selector that targets all paragraph and quote elements */
- {font-size:1em;
- color:#666666;
- }
- q /* write an element selector that targets all quote tags */
- {font-style:italic;
- }
- h1
- {font-size:2em;
- color:#000000;
- }
- h2 /* write an element selector that targets all heading two tags */
- {font-size:1.5em;
- color:#000000;
- }
- a /* write an element selector that targets the hyperlinks */
- {font-weight:bold;
- text-decoration:underline;
- color:#FFB310;
- font-size:1em;
- }
- h1 + p /* write an adjacent selector that targets paragraph tags that follow heading one tags */
- {color:#FFB310;
- }
- span[class="year"] /* span.year is better */ /* write an attribute selector that targets span tags with the class of year */
- {font-size:1.25em;
- }
- /* write an element-specific selector that targets all unordered lists with the class nav --*/ /* wtf this is only possible in css4 */
- ul {margin-bottom: 15px;
- margin-left:0;
- }
- ul.nav li
- {margin-bottom:2px;
- }
- .nav ul > a /* write an element-specific selector that targets unordered lists in the class nav with a descendent selector targeting hyperlinks */
- {padding: 5px 5px 5px 15px;
- display: block;
- width: 100px;
- text-decoration: none;
- background:#990033;
- color:#ffffff;
- }
- ul.nav a:hover, ul.nav a:active
- {background:#ffffff;
- color: #000;
- }
- a:visited/* write an dynamic pseudo-class selector targeting hyperlinks in the visited link state */
- {color:#CCCCCC;
- }
- h1 + p::first-letter/* write an pseudo-element selector targeting the first letter of a paragraph that adjacently follows a heading one tag */
- {font-size:2em;
- }
- </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement