Subscribe to our email newsletter » Subscribe to our email newsletter to receive updates » Free forums  |   Discord server  |   Star on GitHub
Last modified on March 23rd, 2022

The Last (Lightweight) CSS Reset You’ll Need

March 23, 2022

CSS resets have always been a pain in the neck, because of new elements and CSS options being released every few years. To make it more annoying, various browsers have decided to come up with their own default CSS settings in case they are undefined (and sometimes, even if they are defined).

Since our team works with custom WordPress themes on a regular basis, we thought it would be helpful to publish a minimal CSS reset.

We will try to keep this updated every so often when necessary, but by design it should be valid for the long-term. The idea is that pretty much every CSS element in existence is set to have zero margins, padding, and borders… along with inherit fonts and baseline alignment.

Last updated: 22 March, 2022

 

/* css reset */

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, hr, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}

Recent Blog Posts

The Last (Lightweight) CSS Reset You’ll Need

CSS resets have always been a pain in the neck, because of new elements and CSS options being released every few years. To make it more annoying, various browsers have decided to come up with their own default CSS settings in case they are undefined (and sometimes, even if they are defined). Since our team […]

Custom Cron Jobs (Unrestricted Code) Are Here

One of the most requested features ever, custom cron jobs, is finally here! A lot of developers who have come across SlickStack always say “this is awesome and super optimized but I still need the ability to add a few custom cron jobs” for a special API to import their WooCommerce products, or a third […]

Fastest WordPress Hosting (For Under $5/mo)

For over a decade, WordPress has continued to dominate the web hosting industry as small businesses and bloggers alike continue to seek out free and reliable CMS software that can easily be moved between web servers as needed, without being locked-in to any single platform or service. But in the past few years especially, high-tech […]