- Services
- Case Studies
- Technologies
- NextJs development
- Flutter development
- NodeJs development
- ReactJs development
- About
- Contact
- Tools
- Blogs
- FAQ
Mastering CSS border-inline-end for Web Design
Enhance your web designs with flexible and responsive borders.
Values
The border-inline-end
CSS property allows you to define border width, style, and color in one declaration. Here are the values you can use:
<'border-width'>
: Sets the border width. Use keywords likethin
,medium
, orthick
, or specify a length value like1px
or2em
.<'border-style'>
: Sets the border style. Options includenone
,hidden
,dotted
,dashed
,solid
,double
,groove
,ridge
,inset
, andoutset
.<color>
: Sets the border color. Use any valid CSS color value, like named colors, hex values, RGB, RGBA, HSL, or HSLA.
Examples:
Global Values
inherit
: Inherits the value from the parent element.initial
: Sets the border to its initial value (medium none currentColor
).revert
: Reverts to the value defined by the user-agent stylesheet.revert-layer
: Reverts to the value defined by the next outer CSS layer.unset
: Resets to the inherited value if it inherits, or to its initial value if it does not.
Examples
Let’s see how to use border-inline-end
in practice.
Basic Usage
HTML:
CSS:
In this example, the inline-end border of the paragraph is set to a 2px solid red line.
Different Border Styles
HTML:
CSS:
In this example, the inline-end border of the paragraph is set to a 2px dashed red line.
Combining Multiple Properties
HTML:
CSS:
In this example, the inline-end border of the paragraph is set to a medium-width dashed blue line.
Using Global Values
HTML:
CSS:
In this example, the child paragraph inherits the border from the parent div.
Formal Syntax
The formal syntax for border-inline-end
is:
<line-width>
: Specifies the border width.<line-style>
: Defines the border style.<color>
: Sets the border color.
Related Properties
border-block-start
: Defines the border at the start of the block direction.border-block-end
: Defines the border at the end of the block direction.border-inline-start
: Defines the border at the start of the inline direction.
These properties help create responsive designs that adapt to different writing modes and text orientations.
Specifications
The border-inline-end
property is defined in the CSS Logical Properties and Values Level 1 specification. This specification aims to make styling more intuitive and flexible by using logical properties instead of physical ones, ensuring consistent styles across different languages and writing systems.
CSS Logical Properties and Values Level 1
- Specification Link: CSS Logical Properties and Values Level 1 # border-shorthands
Browser Compatibility
The border-inline-end
property is widely supported across major browsers since September 2021. It works seamlessly across many devices and browser versions, making it a reliable choice for web development.
For detailed compatibility information, refer to:
See Also
For further reading and related resources, explore the following topics:
- CSS Logical Properties and Values: Learn more about logical properties and values in CSS.
- Related Properties:
border-top
: Defines the top border of an element.border-right
: Defines the right border of an element.border-bottom
: Defines the bottom border of an element.border-left
: Defines the left border of an element.
- Related Logical Properties:
border-block-start
: Defines the border at the start of the block direction.border-block-end
: Defines the border at the end of the block direction.border-inline-start
: Defines the border at the start of the inline direction.
These related properties work together with border-inline-end
to provide a complete set of logical borders for elements. By using these properties, you can create designs that are adaptable and responsive to different writing systems and text orientations.
Talk with CEO
We'll be right here with you every step of the way.
We'll be here, prepared to commence this promising collaboration.
Whether you're curious about features, warranties, or shopping policies, we provide comprehensive answers to assist you.