CSS Properties: How to specify the size of the border-width?
Solution:
HTML Code:
Explanation:
- This HTML document illustrates how to specify the size of the border width using the border-image-width property.
- A paragraph with id "img1" is styled to have a transparent solid border with 15px width, 15px padding, and a border image sourced from "https://www.w3resource.com/w3r_images/border.png".
- The border-image-repeat property is set to "round" to repeat and round the border image.
- border-image-slice: 30; sets the size of the border image slices to 30.
- border-image-width: 20px; specifies the width of the border image to be 20 pixels.
Live Demo:
See the solution in the browser
Supported browser
![]() |
![]() |
![]() |
![]() |
![]() |
Yes | Yes | Yes | Yes | No |
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.