Medterm CSS Module For Beginners
Medterm CSS Module For Beginners
Module Overview
This module introduces the fundamentals of CSS (Cascading Style Sheets) and its role in web
design. By the end of the module, students will be able to apply basic styles to web pages,
understand the box model, use responsive design techniques, and build layouts with CSS Grid
and Flexbox.
Objectives:
Discussion: CSS is the language used to style HTML elements. It consists of selectors and
declarations.
selector {
property: value;
}
Selectors:
Objectives:
Discussion: In CSS, every element is treated as a box. The box model consists of:
.box {
margin: 10px;
padding: 20px;
border: 1px solid black;
}
Objectives:
Discussion: CSS allows you to style text using properties like font-family, font-size, color,
and more.
p {
font-family: Arial, sans-serif;
font-size: 16px;
color: #333;
}
Backgrounds:
Objectives:
Discussion:
Objectives:
Discussion: Floats are an older layout technique that allows elements to "float" to the left or
right. Positioning allows elements to be placed in specific locations.
.container {
float: left;
width: 50%;
}
.box {
position: absolute;
top: 10px;
left: 20px;
}
Objectives:
Learn how to use CSS Grid and Flexbox for flexible, responsive layouts.
Discussion:
.container {
display: flex;
justify-content: space-between;
}
.container {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
}
Lesson 7: Media Queries and Responsive Design
Objectives:
Discussion: Media queries are used to apply different styles based on screen size.
Objectives:
Discussion: CSS preprocessors like Sass and LESS allow you to write more efficient and
reusable code.
$primary-color: #3498db;
body {
background-color: $primary-color;
}
.nav {
ul {
margin: 0;
padding: 0;
}
}
Module Summary:
Additional Resources: