Login

Please fill in your details to login.





responsiveness

A simple treatment of a complex behaviour. Hope it works.

The Viewport


The viewport is the user's visible area of a web page.

The viewport varies with the device, and will be smaller on a mobile phone than on a computer screen.

Before tablets and mobile phones, web pages were designed only for computer screens, and it was common for web pages to have a static design and a fixed size.

Then, when we started surfing the internet using tablets and mobile phones, fixed size web pages were too large to fit the viewport. To fix this, browsers on those devices scaled down the entire web page to fit the screen.

This was not perfect!! But a quick fix.

<meta name="viewport" content="width=device-width, initial-scale=1.0">


Size Content to The Viewport
Users are used to scroll websites vertically on both desktop and mobile devices - but not horizontally!

So, if the user is forced to scroll horizontally, or zoom out, to see the whole web page it results in a poor user experience.

Some additional rules to follow:

1. Do NOT use large fixed width elements - For example, if an image is displayed at a width wider than the viewport it can cause the viewport to scroll horizontally. Remember to adjust this content to fit within the width of the viewport.

2. Do NOT let the content rely on a particular viewport width to render well - Since screen dimensions and width in CSS pixels vary widely between devices, content should not rely on a particular viewport width to render well.

3. Use CSS media queries to apply different styling for small and large screens - Setting large absolute CSS widths for page elements will cause the element to be too wide for the viewport on a smaller device. Instead, consider using relative width values, such as width: 100%. Also, be careful of using large absolute positioning values. It may cause the element to fall outside the viewport on small devices.

Shortcuts
🌐
getbootstrap.com
Get started with Bootstrap, the world’s most popular framework for building responsive, mobile-first sites, with jsDelivr and a template starter page.
🌐
bulma.io
The modern CSS framework that just works.
🌐
www.w3schools.com
The Flexible Box Layout Module, makes it easier to design flexible responsive layout structure without using float or positioning.
🌐
www.w3schools.com
The CSS Grid Layout Module offers a grid-based layout system, with rows and columns, making it easier to design web pages without having to use floats and positioning.
🌐
www.w3schools.com
The position property specifies the type of positioning method used for an element (static, relative, fixed, absolute or sticky).
🌐
get.foundation
The most advanced responsive front-end framework in the world.
🌐
www.w3schools.com
Media query is a CSS technique introduced in CSS3. It uses the @media rule to include a block of CSS properties only if a certain condition is true.
🌐
www.element84.com
Dealing with type on the web can be a challenge, especially when you have to account for the ever-changing range of screen sizes.
🌐
semantic-ui.com
Semantic is a development framework that helps create beautiful, responsive layouts using human-friendly HTML.
🌐
tailwindcss.com
A utility-first CSS framework packed with classes like flex, pt-4, text-center and rotate-90 that can be composed to build any design, directly in your markup.
Last modified: February 26th, 2022
The Computing CafΓ© works best in landscape mode.
Rotate your device.
Dismiss Warning