w3resource

CSS Properties: How to defines the shape of the border of the bottom-right corner?

Go to Exercise page

Solution:

HTML Code:

<!DOCTYPE html><!-- Declaration of HTML5 document type -->
<html>
<head>
<title>How to defines the shape of the border of the bottom-right corner</title><!-- Title of the HTML document -->
<style>/* CSS style start*/
div {
border: 2px solid; /* Applying a solid border with a width of 2px to the div */
padding: 10px; /* Applying a padding of 10px inside the div */
background:#DDF9F8; /* Setting the background color of the div to #DDF9F8 */
border-bottom-right-radius: 2em; /* Applying a border radius of 2em to the bottom-right corner of the div */
}
</style>
</head>
<body>
<div>CSS, stands for Cascading Style Sheet is a computer language to describe presentation.</div><!-- Div element with text content -->
</body>
</html>

Explanation:

  • This HTML document demonstrates how to define the shape of the border of the bottom-right corner of a div.
  • The CSS style block applies styling to the div element.
  • border: 2px solid; sets a solid border with a width of 2 pixels for all sides of the div.
  • padding: 10px; adds a padding of 10 pixels inside the div, creating space between the content and the border.
  • background:#DDF9F8; sets the background color of the div to #DDF9F8.
  • border-bottom-right-radius: 2em; applies a border radius of 2em to the bottom-right corner of the div, giving it a rounded appearance.

Live Demo:

See the Pen border-bottom-right-radius-answer by w3resource (@w3resource) on CodePen.


See the solution in the browser

Supported browser

Firefox logo Chrome logo Opera logo Safari logo Internet Explorer logo
Yes Yes Yes Yes Yes

Go to Exercise page

What is the difficulty level of this exercise?

Test your Programming skills with w3resource's quiz.



Follow us on Facebook and Twitter for latest update.