Dev Club Class

Lesson 009 - !important Tag

The !important rule in CSS is used to give a CSS property higher priority than other rules. It overrides any other declarations, even if they have higher specificity.

Example:

        p {
            color: blue !important;
        }   

In this example, the paragraph text will always be blue, regardless of other CSS rules.

Lesson 010 - Position

CSS positioning allows you to control the layout of elements on a webpage. The main position values are:

Lesson 011 - Pseudo-classes and Pseudo-elements

Pseudo-elements: are used to style specific parts of an element. They are prefixed with two colons (::). Example: ::before, ::after.

Pseudo-classes: are used to define a special state of an element. They are prefixed with a colon (:).

Lesson 012 - Site responsiveness

Site responsiveness refers to the ability of a website to adapt its layout and design to different screen sizes and devices.

Example of a media query:

        @media (max-width: 600px) {
            body {
                background-color: lightblue;
            }
        }   

In this example, the background color of the body will change to light blue when the viewport width is 600 pixels or less, making the site more user-friendly on smaller devices.

Lesson 013 - Project 03 : Responsive Design

This project applies responsive design in practice by splitting the layout across dedicated desktop, small-screen, and mobile stylesheets.

Open Project 03

Design (Figma)

Project 03 Figma Design

Live Site

Lesson 014 - calc()

The calc() function in CSS allows you to perform calculations to determine CSS property values. It can be used with various units, such as pixels (px), percentages (%), ems (em), and more.

Example:

        .container {
            width: calc(100% - 50px);
        }   

In this example, the width of the container will be 100% of its parent element's width minus 50 pixels, allowing for dynamic sizing based on the available space.

Certificate

CSS Course Certificate