CSS Worksheet 1
CSS Worksheet 1
Group: 1
Instructions
This is a continuation from your previous worksheet (HTML worksheet).
Complete this worksheet during your lab session and submit it to your tutor. Write the codes
in the respective boxes provided below to style the web page based on the guidelines
provided.
class =”style1”
class =”style1”
id="style2"
Float left
class=”left”
Specific guidelines
1. Set the font type of the entire page to Georgia, Garamond and Sans Serif
2. For <aside>, set the width to occupy 20% of the screen and vertical-align it to the center. Set left,
right and top padding to 10px, bottom padding to 15px using shorthand notation, float it to the
right.
3. For the footer, add 40px top padding and center-align the text.
4. Remember to transfer the formatting you did in HTML to CSS for example bold and italic for inline
text, table column width, padding, etc
style.css
*{
font-family: Georgia, Garamond, Times, serif;
}
aside {
width: 20%;
vertical-align: center;
padding: 10px 10px 15px 10px;
float: right;
border: 1px solid black;
}
footer {
padding-top: 40px;
text-align: center;
clear: both;
}
table,
th,
td {
border: 1px solid black;
}
th,
td {
padding: 10px;
text-align: center;
}
caption {
caption-side: bottom;
}
.left {
float: left;
}
.style1 {
font-weight: bold;
}
.style2 {
font-style: italic;
}
.main {
text-align: center;
}