Layout is the way in which the different graphic elements that make up a page are related to each other.
In the field of the modern web design there is a general tendency to build pages as follows:
There are slight variations with the menu on the right or two columns rather than one, but the general trend is established on this diagram.
This standardization is explained by the fact that it is easier for the user to find the information.
Of course, it is not mandatory to respect this type of layout and it is up to everyone to present the content of its pages as he wishes.
Some sectors of activity even have an interest in playing the card of originality.
Anyway, the way you want to present your pages is yours and it will be good to think first to establish a layout that meets the objectives you have set.
After this first thought to determine the trend of your layout, you will have to ask yourself whether you are giving your site a fixed or expandable width.
Indeed, there is an important phenomenon to manage when designing a site, it is the screen resolution.
By viewing the display properties of your computer (Right click on the desktop + properties), the Settings tab tells you the resolution of your screen as shown in the image below:
Here the screen is set with a resolution of 1440 x 900 pixels. This means that the screen displays a window of 1440 pixels horizontally and 900 vertically. It is of course possible to choose the resolution that best corresponds to his preferences but this is where the problem occurs when setting up a modern web design because we do not know the resolution that each user has chosen. It is therefore necessary to build pages that adapt to both a resolution of 1024 x 768 and another of 1280 x 1024.
The general trend is to choose between a site of fixed width (example 960 pixels) centered horizontally and a variable width site adapting to the width of the window.
CSS can handle two relatively different aspects of your page layout:
Presentation of texts, playing on size, color, line spacing, type of character, fat, etc.
Layout, managing the layout of the main elements (header, menu, footer, etc.) and their contents.
This second point is undoubtedly the most complex to master. To allow you to go around and make the evolutionary modern web design that allow the CSS, we will address the necessary concepts one by one:
When the browser encounters a “block ” element , it returns to the line, displays the block element and then returns to the line to dispose of the rest of the content.
If the user changes the width of the page, the browser recalculates the layout of all items on the page to fit the new available width (unless the page width is set by specific instructions).
This flow description corresponds to the “standard” schema of a modern web design page. CSS allows you to manage a very wide variety of exceptions to this schematic and allow you for example:
To have several columns of content side by side
The width of the site remains the same whatever the resolution of the screen but the sidebands are more or less wide.