Tillitsdone
down Scroll to discover

CSS border-inline-end-width Enhance Responsive Design

Learn how to use CSS border-inline-end-width to create adaptable layouts.

This property adjusts the border width based on writing mode, direction, and text orientation.

Options include specific lengths, keywords like 'thick', and global values.
thumbnail

Introduction

The border-inline-end-width CSS property defines the width of the logical inline-end border of an element. This border can be the top, right, bottom, or left border, depending on the element’s writing mode and direction.

Specification

The border-inline-end-width property is part of the CSS Logical Properties and Values Level 1 specification. This specification helps create more adaptable and responsive designs by defining logical properties and values.

Description

The border-inline-end-width CSS property defines the width of the logical inline-end border of an element. This border can be the top, right, bottom, or left border, depending on the element’s writing mode and direction.

This property maps to the border-top-width, border-right-width, border-bottom-width, or border-left-width properties, depending on the values set for writing-mode, direction, and text-orientation.

Syntax

/* Length values */
border-inline-end-width: 2px;
border-inline-end-width: thick;
/* Global values */
border-inline-end-width: inherit;
border-inline-end-width: initial;
border-inline-end-width: revert;
border-inline-end-width: revert-layer;
border-inline-end-width: unset;

Values

  • Length values: Specific lengths like 2px, 1em, etc.
  • Keyword values: Predefined keywords like thin, medium, and thick.
  • Global values: General CSS values like inherit, initial, revert, revert-layer, and unset.

Formal Definition

PropertyValue
Initial valuemedium
Applies toAll elements
InheritedNo
PercentagesRefers to the logical width of the containing block
Computed valueAbsolute length; 0 if the border style is none or hidden
Animation typeBy computed value type

Formal Syntax

border-inline-end-width =
<line-width>
<line-width> =
<length> | thin | medium | thick

Examples

Example 1: Applying a Border with Vertical Text

HTML:

<div>
<p class="exampleText">Example text</p>
</div>

CSS:

div {
background-color: yellow;
width: 120px;
height: 120px;
}
.exampleText {
writing-mode: vertical-lr;
border: 1px solid blue;
border-inline-end-width: 5px;
}

Results:

This example shows how the border-inline-end-width property can be used to adjust the border width of an element with vertical text orientation. The border-inline-end-width is set to 5px, which visually highlights the end of the inline content.

Example 2: Adjusting Border Width in a Horizontal Layout

HTML:

<div class="container">
<p class="horizontalText">This is a sample text.</p>
</div>

CSS:

.container {
background-color: lightgray;
width: 200px;
height: 100px;
padding: 10px;
}
.horizontalText {
border: 2px solid black;
border-inline-end-width: 10px;
}

Results:

This example demonstrates how the border-inline-end-width property can be used to adjust the border width of an element in a horizontal layout. The border-inline-end-width is set to 10px, creating a distinct border at the end of the inline content.

Example 3: Using Keyword Values

HTML:

<div class="box">
<p class="thickBorder">Thick Border</p>
<p class="mediumBorder">Medium Border</p>
<p class="thinBorder">Thin Border</p>
</div>

CSS:

.box {
display: flex;
flex-direction: column;
gap: 10px;
}
p {
padding: 10px;
background-color: lightblue;
border-style: solid;
}
.thickBorder {
border-inline-end-width: thick;
}
.mediumBorder {
border-inline-end-width: medium;
}
.thinBorder {
border-inline-end-width: thin;
}

Results:

This example shows how to use keyword values (thick, medium, thin) with the border-inline-end-width property. Each paragraph has a different border width, demonstrating the flexibility of the property.

Browser Compatibility

The border-inline-end-width property is well-supported across various browsers:

  • Chrome: Supported since version 69.
  • Firefox: Supported since version 41.
  • Opera: Supported since version 56.
  • Edge: Supported since version 79.
  • Safari: Supported since version 12.1.

See Also

icons/css-4.svg CSS Blogs
CSS3 is the latest version of Cascading Style Sheets, offering advanced styling features like animations, transitions, shadows, gradients, and responsive design.
icons/logo-tid.svg

Talk with CEO

Ready to bring your web/app to life or boost your team with expert Thai developers?
Contact us today to discuss your needs, and let’s create tailored solutions to achieve your goals. We’re here to help at every step!
🖐️ Contact us
Let's keep in Touch
Thank you for your interest in Tillitsdone! Whether you have a question about our services, want to discuss a potential project, or simply want to say hello, we're here and ready to assist you.
We'll be right here with you every step of the way.
Contact Information
rick@tillitsdone.com+66824564755
Find All the Ways to Get in Touch with Tillitsdone - We're Just a Click, Call, or Message Away. We'll Be Right Here, Ready to Respond and Start a Conversation About Your Needs.
Address
9 Phahonyothin Rd, Khlong Nueng, Khlong Luang District, Pathum Thani, Bangkok Thailand
Visit Tillitsdone at Our Physical Location - We'd Love to Welcome You to Our Creative Space. We'll Be Right Here, Ready to Show You Around and Discuss Your Ideas in Person.
Social media
Connect with Tillitsdone on Various Social Platforms - Stay Updated and Engage with Our Latest Projects and Insights. We'll Be Right Here, Sharing Our Journey and Ready to Interact with You.
We anticipate your communication and look forward to discussing how we can contribute to your business's success.
We'll be here, prepared to commence this promising collaboration.
Frequently Asked Questions
Explore frequently asked questions about our products and services.
Whether you're curious about features, warranties, or shopping policies, we provide comprehensive answers to assist you.