Border Style Classes
Code Examples
Solid card border — the default pattern for most bordered surfaces:Best Practices
- Always pair style with width and color. A
border-solidclass on its own produces no visible result. Every bordered element needs all three: a width (border-2), a style (border-solid), and a color (border-gray). - Use
border-solidas your default. It works for the vast majority of UI surfaces — cards, form inputs, section wrappers, and interactive components. - Reserve
border-dashedfor intentional semantic use. Dashed borders signal to users that something is optional, editable, or a placeholder. Avoid using dashed borders for decorative purposes where a solid border would do. - Use
border-noneto override. When an Elementor widget or parent container applies a border you don’t want,border-none(combined withborder-0) gives you a clean override without needing custom CSS.
Related Utilities
- Border Width — Set the thickness of your border before applying a style.
- Border Radius — Round the corners of your styled element.