border-x-8
Tailwind CSS border width utility for controlling element borders. The border-x-8
class applies a custom border width.
Class Information
CSS Class
border-x-8
CSS Properties
border-left-width: 8px;
border-right-width: 8px;
border-style: solid;
Live Examples
Border Width Examples
Content
8px border on left and right sides
<div class="border-x-8 border-blue-500">
Content
</div>
All Border Width Options
Usage Guidelines
✅ Common Use Cases:
- border-0: Remove borders completely
- border (1px): Default thin borders for cards, inputs
- border-2: Medium borders for emphasis
- border-4: Thick borders for strong visual separation
- border-8: Very thick borders for design elements
- Directional borders: Create dividers and separators
💡 Pro Tips:
- Combine with border colors:
border-2 border-blue-500
- Use directional borders for dividers:
border-r border-gray-300
- Focus states:
focus:border-2 focus:border-blue-500
- Responsive borders:
border md:border-2
- X/Y axis for symmetric borders:
border-x-2
- Start/End for RTL support:
border-s-2