Front-end Tutorials

Front-end Tutorials

HTMLCSSSassJavaScriptReactJS
CMS Tutorials

CMS Tutorials

WordPress
Tutorials expand

CSS Properties

CSS border-start-end-radius Property

Posted in CSS Tutorial
Updated on Oct 02, 2024
By Mari Selvan
👁️ 13 - Views
⏳ 4 mins
💬 1 Comment
CSS border-start-end-radius Property

Photo Credit to CodeToFun

🙋 Introduction

The border-start-end-radius property in CSS is a logical property that allows you to control the rounding of the corner on the start side of the block's end edge.

This property is part of the broader family of CSS logical properties that adapt to the writing mode of the document, making it more versatile for different languages and layouts.

💡 Syntax

The syntax for the border-start-end-radius property is similar to other border-radius properties. You can define the radius using length values, percentages, or a combination of both.

Syntax
Copied
Copy To Clipboard
element {
  border-start-end-radius: radius;
}
  • radius: This can be a length (e.g., px, em, rem) or a percentage, defining the curvature of the corner.

🎛️ Default Value

The default value of the border-start-end-radius property is 0, meaning no rounding is applied to the corner by default.

🏠 Property Values

ValueDescription
lengthA specific length value (e.g., 10px, 1em) that defines the radius of the corner.
percentageA percentage value that defines the radius relative to the width or height of the element.

📄 Example

In this example, we'll apply the border-start-end-radius property to a box with a set radius.

index.html
Copied
Copy To Clipboard
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>CSS border-start-end-radius Example</title>
  <style>
    .box {
      width: 200px;
      height: 200px;
      background-color: lightblue;
      border: 2px solid blue;
      border-start-end-radius: 50px;
    }
  </style>
</head>
<body>
  <h1>Box with Custom Start-End Border Radius</h1>
  <div class="box"></div>
</body>
</html>

In this example, the top-right corner of the box will have a radius of 50px, creating a rounded effect.

🖥️ Browser Compatibility

The border-start-end-radius property is supported in most modern browsers, including the latest versions of Chrome, Firefox, Safari, Edge, and Opera. As with any CSS property, it's recommended to test your design across different browsers to ensure compatibility.

🎉 Conclusion

The border-start-end-radius property is a useful tool when you want to apply a rounded corner to the start side of an element's end edge, especially in a layout that adapts to different writing modes. It simplifies the process of creating responsive and adaptive designs that look great in any language or layout. Try experimenting with different radius values to see how this property can enhance the visual appeal of your web projects.

👨‍💻 Join our Community:

To get interesting news and instant updates on Front-End, Back-End, CMS and other Frameworks. Please Join the Telegram Channel:

Author

author
👋 Hey, I'm Mari Selvan

For over eight years, I worked as a full-stack web developer. Now, I have chosen my profession as a full-time blogger at codetofun.com.

Buy me a coffee to make codetofun.com free for everyone.

Buy me a Coffee

Share Your Findings to All

Subscribe
Notify of
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
We make use of cookies to improve our user experience. By using this website, you agree with our Cookies Policy
AgreeCookie Policy