border-4
Tailwind CSS border width utility for controlling element borders. The border-4 class applies a 4px border width.
Class Information
CSS Class
border-4CSS Properties
border-width: 4px;
border-style: solid;
Live Examples
Border Width Examples
Content
4px border width
<div class="border-4 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