Module 7: Responsive Web Design

Module 7: Responsive Web Design

This page demonstrates how a website can adapt to different screen sizes, including desktop, tablet, and mobile devices.

Example 1: CSS Grid

This section demonstrates CSS Grid. On a large screen, the images are displayed in multiple columns. As the screen becomes smaller, the number of columns decreases so the content remains easy to read.

Desktop Layout

Multiple images can appear side by side on a large screen.

flower

Tablet Layout

The number of columns can decrease as the screen becomes narrower.

purple_rose

Mobile Layout

Image can stack vertically on a small mobile screen.

vase-flower

Example 2: Flexible Images

The image below uses a maximum width of 100%. This allows the image to shrink when the screen becomes smaller without overflowing the page.

vase

Example 3: Flexbox

This section demonstrates Flexbox. The items are arranged in a row on larger screens and can wrap onto additional lines when there is not enough horizontal space.

HTML
CSS
Javascript