---
title: CSS Background and Borders
slug: Web/CSS/CSS_Backgrounds_and_Borders
tags:
- CSS
- CSS Backgrounds and Borders
- CSS Reference
- NeedsTranslation
- Overview
- TopicStub
translation_of: Web/CSS/CSS_Backgrounds_and_Borders
translation_of_original: Web/CSS/CSS_Background_and_Borders
original_slug: Web/CSS/CSS_Background_and_Borders
---
{{CSSRef}}
CSS Background and Borders is a module of CSS that defines how background and borders of elements are described. Borders can be lines or images, boxes can have one or multiple backgrounds, have rounded corners, and shadows.
Reference
CSS Properties
- {{cssxref("background")}}
- {{cssxref("background-attachment")}}
- {{cssxref("background-clip")}}
- {{cssxref("background-color")}}
- {{cssxref("background-image")}}
- {{cssxref("background-origin")}}
- {{cssxref("background-position")}}
- {{cssxref("background-repeat")}}
- {{cssxref("background-size")}}
- {{cssxref("box-shadow")}}
- {{cssxref("border")}}
- {{cssxref("border-bottom")}}
- {{cssxref("border-bottom-color")}}
- {{cssxref("border-bottom-left-radius")}}
- {{cssxref("border-bottom-right-radius")}}
- {{cssxref("border-bottom-style")}}
- {{cssxref("border-bottom-width")}}
- {{cssxref("border-collapse")}}
- {{cssxref("border-color")}}
- {{cssxref("border-image")}}
- {{cssxref("border-image-outset")}}
- {{cssxref("border-image-repeat")}}
- {{cssxref("border-image-slice")}}
- {{cssxref("border-image-source")}}
- {{cssxref("border-image-width")}}
- {{cssxref("border-left")}}
- {{cssxref("border-left-color")}}
- {{cssxref("border-left-style")}}
- {{cssxref("border-left-width")}}
- {{cssxref("border-radius")}}
- {{cssxref("border-right")}}
- {{cssxref("border-right-color")}}
- {{cssxref("border-right-style")}}
- {{cssxref("border-right-width")}}
- {{cssxref("border-style")}}
- {{cssxref("border-top")}}
- {{cssxref("border-top-color")}}
- {{cssxref("border-top-left-radius")}}
- {{cssxref("border-top-right-radius")}}
- {{cssxref("border-top-style")}}
- {{cssxref("border-top-width")}}
- {{cssxref("border-width")}}
Guides
- Using CSS multiple backgrounds
- Explains how to set backgrounds on elements and how they will interact with it.
- Scaling background images
- Describes how to change the appearance of the background images, by stretching them or repeating them, to cover the whole background of the element, or not.
Specifications
Specification |
Status |
Comment |
{{ SpecName('CSS3 Backgrounds') }} |
{{ Spec2('CSS3 Backgrounds') }} |
|
{{SpecName('CSS2.1', 'box.html')}} |
{{Spec2('CSS2.1')}} |
|
{{SpecName('CSS1', '#border')}} |
{{Spec2('CSS1')}} |
|
Browser compatibility
{{CompatibilityTable()}}
Feature |
Chrome |
Firefox (Gecko) |
Internet Explorer |
Opera |
Safari |
Basic support |
1.0 |
{{CompatGeckoDesktop("1.0")}} |
4.0 |
3.5 |
1.0 (85) |
Feature |
Android |
Firefox Mobile (Gecko) |
IE Phone |
Opera Mobile |
Safari Mobile |
Basic support |
{{CompatVersionUnknown()}} |
{{CompatGeckoMobile("1.9.2")}} |
{{CompatVersionUnknown()}} |
{{CompatVersionUnknown()}} |
1.0 |