LabHTML04 CSS Selectors and Rules
LabHTML04 CSS Selectors and Rules
1.1.1 Constrains
<body>
o Width: 960px;
o Center the body
o font-family: Arial, sans-serif;
o Text Color: #fcfcfc;
o Background: #355664;
Headings
o Font-family: forte, Arial, sans-serif;
<h1>
o Text size: 50px;
o Padding: 10px 0 0;
o Center the text
<h2>
o Text size: 40px;
o Letter spacing: 15px;
o Center the text
o Border at the bottom: 3px solid #416371;
o Padding at the bottom: 20px;
<h3>
o Text Align: right;
o Text size: 30px;
o Font-weight: normal;
o Margin: 0 0 10px;
Paragraphs
o Line height: 20px;
o Padding bottom: 5px;
o Text Color: #94c258;
Images
o Width: 500px;
o Height: 300px;
o Border: None;
Div with class = "article-content"
o Margin: 15px 0;
Navigation
o Background: #355664;
o Padding-right and Left: 5px;
o Padding-top and Bottom: 0px;
Hyperlinks
o Text Color: #ffffff;
o Text Color: #7CB3E9;
o Text Color: #8EC45B;
o Margin: 5px 2px;
o Padding: 7px 10px 4px;
o Text Size: 30px;
Article
o Height: 390px;
o Background: #213E4A;
o Padding: 20px;
o Margin: 0 0 10px;
Figure
o Border: 3px solid #142830;
o Float: right;
o Height: 300px;
o Width: 500px;
o Margin left: 15px;
Footer
o Border at top: 3px solid #142830;
o Padding Top: 15px;
o Margin Bottom: 30px;
o Center the text
o Text size: 20px;
1.1.2 Hints
Use:
Reset the CSS file;
text-transform: uppercase;
text-transform: none;
text-transform: lowercase;
border-radius: 10px;
1.2 Ancient Architecture
1.2.1 Constrains
Body
o Font Family: Roboto, sans-serif;
o Background: #e2d7aa;
o Text Color: #000000
o Text size: 16px
o Width: 1180px;
o Center the container
Image
o Width: 1100px;
o Height: 450px;
Image-container
o Width: 1600px;
o Height: 450px;
o Margin at Top: 65px;
<h1>
o Text size: 60px;
o Center the text
o Margin at the top: 65px;
o Font Family: ‘Indie Flower’, cursive;
Navigation
o Margin: 30px;
Hyperlinks
o Text size: 28px;
o Text-color: #000000;
Hyperlink
o Text-color: #0a2d4a;
o Font Weight: Bold;
Image in Article
o Width: 350px;
o Height: 200px;
o Margin Bottom: 20px;
First Letter in paragraph
o font-family: EucrosiaUPC, sans-serif;
o Text size: 40px;
Hyperlink in span
o Background: url(images/bg2.jpg)
o Text color: #ffffff;
o Padding: 10px;
o Margin-top: 10px;
Footer
o Margin: 0px;
o Padding: 10px 0 10px 0;
o Center the text
1.2.2 Hints
To style the comments box use:
article p:last-of-type span:first-of-type a::before {
content: url("images/comment.png");
position: relative;
right: 5px;
top: 7px;
padding: 10px;
}
--------------------------