a video guide to CSS Borders properties

Select any property below and we’ll show you step-by-step how to use the property, with video demo, tips and practical examples you can code for yourself.

border-collapse

border-color

border-radius

border-style

border-width

border

FAQs

about creating and styling borders with CSS

What is the difference between background-color and background-image?

background-color sets the color of the background of an element, while background-image sets an image as the background of an element.

What is background-position used for?

background-position sets the position of a background image within its container. It can be set using keywords (such as top or center) or by specifying an exact pixel or percentage value.

What is the difference between background-repeat: repeat and background-repeat: no-repeat?

background-repeat: repeat tiles the background image both horizontally and vertically to fill the entire container, while background-repeat: no-repeat displays the image only once, without tiling.

What is background-size used for?

background-size sets the size of a background image. It can be set using keywords (such as cover or contain) or by specifying an exact pixel or percentage value.

What does background-attachment: fixed do?

background-attachment: fixed fixes the background image in place, so that it remains stationary while the page scrolls.

Copyright 2023