CSS border-image-source Property

Specify an CSS border-image-source around an element: #borderimg { border-image-source: url(border.png); } Try it Yourself » Definition and Usage The border-image-source property specifies the path to the image to be used as a border (instead of the normal border around an element). Tip: If the value is “none”, or if the image cannot be displayed, the border styles […]

CSS border-image Property

Specify an CSS border-image around an element: #borderimg { border-image: url(border.png) 30 round; } Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The border-image property allows you to specify an image to be used as the border around an element. The border-image property is a shorthand property for border-image-source, border-image-slice, border-image-width, border-image-outset and border-image-repeat. Omitted values are set […]

CSS border-collapse Property

Set the CSS border-collapse model for two tables: #table1 { border-collapse: separate; }#table2 { border-collapse: collapse; } Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The border-collapse property sets whether table borders should collapse into a single border or be separated as in standard HTML. Default value: separate Inherited: yes Animatable: no. Read about animatable Version: […]

CSS border-bottom-right-radius Property

Add CSS border-bottom-right-radius corner of two <div> elements: #example1 { border: 2px solid red; border-bottom-right-radius: 25px; } #example2 { border: 2px solid red; border-bottom-right-radius: 50px 20px; } Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The border-bottom-right-radius property defines the radius of the bottom-right corner. Tip: This property allows you to add rounded borders to elements! Default […]

CSS Border-Bottom-left-radius Property

CSS border-bottom-left-radius: #example1 { border: 2px solid red; border-bottom-left-radius: 25px; }#example2 { border: 2px solid red; border-bottom-left-radius: 50px 20px; } Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The border-bottom-left-radius property defines the radius of the bottom-left corner. Tip: This property allows you to add rounded borders to elements! Default value: 0 Inherited: no Animatable: yes. Read about animatable – Try […]

CSS border-bottom-color Property

Set a CSS border-bottom-color: div {border-bottom-color: coral;} Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The border-bottom-color property sets the color of an element’s bottom border. Note: Always declare the border-style or the border-bottom-style property before the border-bottom-color property. An element must have a border before you can change the color. Default value: […]

CSS border-bottom-style Property

Set a border-bottom-style: div {border-bottom-style: dotted;} Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The border-bottom-style property sets the style of an element’s bottom border. Default value: none Inherited: no Animatable: no. Read about animatable Version: CSS1 JavaScript syntax: object.style.borderBottomStyle=”dotted” Try it ثSS Syntax border-bottom-style: none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|initial|inherit; Property Values Value Description Code none Specifies no border. […]

CSS border-bottom Property

Example Set the style of the bottom border for different elements: h1 { border-bottom: 5px solid red; } h2 { border-bottom: 4px dotted blue; } div { border-bottom: double; } Try it Yourself » Definition and Usage The border-bottom shorthand property sets all the bottom border properties in one declaration. The properties that can be set must be in the following […]

CSS border-bottom-width Property

Set a CSS border-bottom-width: div {border-bottom-width: thin;} Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The border-bottom-width property sets the width of an element’s bottom border. Note: Always declare the border-style or the border-bottom-style property before the border-bottom-width property. An element must have borders before you can change the width. Default value: medium […]

CSS border Property

Example Set the style of the borders for different elements: h1 { border: 5px solid red; } h2 { border: 4px dotted blue; } div { border: double; } Try it Yourself » Definition and Usage The border property is a shorthand property for border-width, border-style and border-color. Default value: medium none color Inherited: no Animatable: yes, see individual properties. Read about animatable – Try it Version: […]

CSS border-color Property

Set a CSS border-color: div {border-color: coral;} Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The border-color property sets the color of an element’s four borders. This property can have from one to four values. If the border-color property has four values: border-color: red green blue pink; top border is red right […]

CSS border-style Property

Set a CSS border-style: div {border-style: dotted;} Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The border-style property sets the style of an element’s four borders. This property can have from one to four values. Examples: border-style: dotted solid double dashed; top border is dotted right border is solid bottom border is […]

CSS border-width Property

Set a border-width: div {border-width: thin;} Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The border-width property sets the width of an element’s four borders. This property can have from one to four values. Examples: border-width: thin medium thick 10px; top border is thin right border is medium bottom border is thick […]

CSS background-blend-mode Property

Specify the Background Blend-mode to be “lighten”: div { width: 400px; height: 400px; background-repeat: no-repeat, repeat; background-image: url(“img_tree.gif”), url(“paper.gif”); background-blend-mode: lighten; } Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The background-blend-mode property defines the blending mode of each background layer (color and/or image). Default value: normal Inherited: no Animatable: no. Read about animatable Version: CSS3 JavaScript syntax: […]

CSS background-attachment Property

A background-attachment (image) that will not scroll with the page (fixed): body{ background-image: url(“img_tree.gif”); background-repeat: no-repeat; background-attachment: fixed; } Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The background-attachment property sets whether a background image scrolls with the rest of the page, or is fixed. Default value: scroll Inherited: no Animatable: no. Read about animatable […]

CSS3 background-clip Property

Example Specify how far the background should extend within an element: div { border: 10px dotted black; padding: 15px; background: lightblue; background-clip: padding-box; } Try it Yourself » Definition and Usage The background-clip property defines how far the background (color or image) should extend within an element. Default value: border-box Inherited: no Animatable: no. Read about animatable Version: CSS3 JavaScript syntax: object.style.backgroundClip=”content-box” Try […]

CSS3 background-origin Property

Example Let the background image start from the upper left corner of the content: #example1 { border: 10px double black; padding: 25px; background: url(paper.gif); background-repeat: no-repeat; background-origin: content-box; } Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The background-origin property specifies the origin position (the background positioning area) of a background image. Note: This property has no […]

CSS background-attachment Property

Example A background-image that will not scroll with the page (fixed): body{ background-image: url(“img_tree.gif”); background-repeat: no-repeat; background-attachment: fixed; } Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The background-attachment property sets whether a background image scrolls with the rest of the page, or is fixed. Default value: scroll Inherited: no Animatable: no. Read about animatable […]

CSS background-repeat Property

Example Repeat a background-image only vertically: body { background-image: url(“paper.gif”); background-repeat: repeat-y; } Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The background-repeat property sets if/how a background image will be repeated. By default, a background-image is repeated both vertically and horizontally. Tip: The background image is placed according to the background-position property. If […]

CSS3 background-size Property

Example Specify the size of a background image with “auto” and in pixels: #example1 { background: url(mountain.jpg); background-repeat: no-repeat; background-size: auto; }#example2 { background: url(mountain.jpg); background-repeat: no-repeat; background-size: 300px 100px; } Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The background-size property specifies the size of the background images. There are four different syntaxes you can use with […]