w3resource

CSS Properties: How to defines the shape of the border of the bottom-left 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-left corner</title><!-- Title of the HTML document -->
<style>/* CSS style start*/
div {
border: 2px solid; /* Setting a solid border with a width of 2 pixels for all sides of the div */
padding: 10px; /* Setting padding of 10 pixels inside the div */
background:#DDF9F8; /* Setting the background color of the div to #DDF9F8 */
border-bottom-left-radius: 2em; /* Defining the shape of the bottom-left corner of the border to have a horizontal radius of 2em and a vertical radius of 2em */
}
</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 bottom-left corner of a border using CSS.
  • The CSS style block applies styling to all div elements.
  • border: 2px solid; sets a solid border with a width of 2 pixels for all sides of the div.
  • padding: 10px; sets padding of 10 pixels inside the div to create space between the content and the border.
  • background:#DDF9F8; sets the background color of the div to #DDF9F8.
  • border-bottom-left-radius: 2em; defines the shape of the bottom-left corner of the border to have a horizontal radius of 2em and a vertical radius of 2em, giving it a rounded appearance.

Live Demo:

See the Pen border-bottom-left-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.