Зміст курсу
Основи CSS
Основи CSS
Додавання Простору Елементам
Властивості margin
, padding
і border
допомагають нам додати більше простору до елементів, покращуючи зовнішній вигляд веб-ресурсу, читабельність і зручність використання. Розглянемо кожну з них детальніше.
margin and padding properties
padding property
padding
refers to the space between an element's content and its border.
css
Властивість margin
Марджин називається простір між елементом і сусідніми елементами. Це область поза межами елемента.
css
margin property
margin
refers to the space between an element and the adjacent elements. It is the area outside the element's border.
css
margin property
margin
refers to the space between an element and the adjacent elements. It is the area outside the element's border.
css
Each Margin Separately
css
Each Margin Separately
css
border property
border
refers to the line that surrounds an element's padding and content. It is the area that separates the element's content from its margin.
css
Shorthand
css
It means that the border of all sides will look the same. Their width
is 4px
, style
is solid
, and color
is brown
.
Let's consider the following example and figure out the possible border styles:
index.html
index.css
Each Border Separately.
css
1. Як застосувати різні значення margin до різних сторін елемента?
2. How can we apply different margin
values to different sides of an element?
3. How can we apply different margin
values to different sides of an element?
Дякуємо за ваш відгук!