Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6200449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:22:15+00:00 2026-05-24T04:22:15+00:00

I was intending to use Eric Meyer’s CSS reset but I stumbled in some

  • 0

I was intending to use Eric Meyer’s CSS reset but I stumbled in some cross-browser differences (like input margins). Based on it, i came up with a more agressive aproach:

(This is outdated. Don’t forget to check the current revised version at the end of this question and criticize it as you wish)

/* CSS Reset by Hugo Leonardo. Based on Eric Meyer's CSS Reset (just google it). */
* {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font: inherit;
    text-decoration: none;

    /* in case "font: inherit" fails (IE7) */
    font-family: "times new roman";
    font-size: 100%;
    font-style: normal;
    font-variant: normal;
    font-weight: normal;
    /* remove this block if you DON'T want to support lame browsers */
}

:before, :after {
    content: '';
}

:link, :visited, :hover, :active {
    color: inherit;
    color: #000; /* for IE7 'inherit' problem (again) */
    text-decoration: none;
}

:focus {
    outline: 0;
}

ol li, ul li {
    list-style: none;
}

table {
    /* "collapse" here is because of IE7 (maybe others?). don't remove it as it affects other browsers as well */
    border-collapse: collapse;
    border-spacing: 0;
}

/* this entire block was copied from Eric Meyer's CSS reset */
/* HTML5 "display" reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
    display: block;
}

It worked smoothly in all tested browsers:

  • IE7
  • IE8
  • Chrome (newest)
  • Firefox (newest)
  • Opera (newest)

The question is: Does anyone see any trouble here? I consider myself not so good in CSS so I don’t know if this will get me in any trouble in the future.

Obs.: this reset is for cross-browser issues only. It should (or must!) be followed by generic rules for elements like input, a, code, and so on (ex: input of type “text” would be invisible without borders!). I will be adding things like generic a styles and stuff later. For now I’m resetting things, getting rid of (almost) everything that isn’t the same across the major browsers.


PROBLEMS SPOTTED SO FAR

  • The * selector could cause performance issues.

  • The * selector with some of the rules override some default styles of elements in a way they can’t be recovered. ex: the default style of an input of the type “submit”.

  • Surprisingly the :before, :after { content: ''; } was breaking select elements in Firefox.

  • In the revised version I tried to set margin: 0 to all input elements. Most browsers ignored it for inputs type checkbox and radio.


REVISED VERSION

/* CSS Reset by Hugo Leonardo Leão Mota
Based on Eric Meyer's CSS Reset: http://meyerweb.com/eric/thoughts/2011/01/03/reset-revisited/
Helped by fellows in stackoverflow: http://stackoverflow.com/questions/6892982/is-this-css-reset-okay */

/* resetting style for every visible element except 'ruby' family and form controls
   browsers deal with controls (and ruby style) in their own way */
a, abbr, acronym, address, b, big, blockquote, body,
br, caption, cite, code, col, colgroup, dd, del, dfn, div,
dl, dt, em, fieldset, form, h1, h2, h3, h4, h5, h6, hr, html, i,
img, ins, kbd, label, legend, li, noscript, object, ol, p, pre, q, samp,
small, span, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, ul, var {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font: inherit;
    text-decoration: none;

    /* in case "font: inherit" fails (IE7) */
    font-family: "times new roman";
    font-size: 100%;
    font-style: normal;
    font-variant: normal;
    font-weight: normal;
    /* remove this block if you DON'T want to support lame browsers */
}

/* browsers are free to handle controls but
   we can't let them mess up with the other elements  */
button, select, textarea,
input[type=text], input[type=password], input[type=submit],
input[type=image], input[type=reset], input[type=button], input[type=file] {
    margin: 0;
}



:link, :visited, :hover, :active {
    color: inherit;
    color: #000; /* for IE7 'inherit' problem (again) */
    text-decoration: none;
}

:focus {
    outline: 0;
}

ol li, ul li {
    list-style: none;
}

table {
    /* "border-collapse" here is because of IE7 different behaviour (maybe others?).
       don't remove it as it affects other browsers as well */
    border-collapse: collapse;
    border-spacing: 0;
}

/* the next two blocks were copied from Eric Meyer's CSS reset */

blockquote:before, blockquote:after, q:before, q:after {
    content: '';
}

/* HTML5 "display" reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
    display: block;
}

END

Well, the more i tried to improve my reset, the more it looked like meyer’s css reset, so i gave mine up and adopted it. works just fine :p

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T04:22:16+00:00Added an answer on May 24, 2026 at 4:22 am

    I generally think that wide-ranging CSS resets are not the best. I agree with Russ Weakley, who “zeroed” in on three big concerns:

    1. Every element that’s reset must be redefined. CSS file size & maintenance can increase.
    2. You could forget to restyle something you reset.
    3. Some resets are harmful to users who rely on keyboards for navigation.

    See his whole presentation here: http://www.maxdesign.com.au/articles/css-reset/

    Specifically, I think the following should not be reset, as it is in your stylesheet

    :before, :after {
        content: '';
    }
    
    :link, :visited, :hover, :active {
        color: inherit;
        color: #000; /* for IE7 'inherit' problem (again) */
        text-decoration: none;
    }
    
    :focus {
        outline: 0;
    }
    
    ol li, ul li {
        list-style: none;
    }
    

    focus is an accessibility issue.

    ol and ul should have their default styles. You are likely to need them. (Although you may need to overwrite them for a nav.)

    :link, :visited, :hover, :active I would reset these only as needed.

    As mentioned and acknowledged by you *{ // } could cause performance issues and may cause unforeseen issues.

    Also, I would consider adding something to reset the big top and bottom margins on headers

    h1, h2, h3, h4, h5, h6 {margin-top:0; margin-bottom:0;}

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm intending to use the Ms-RL for a project on CodePlex, but I'm not
I was intending on use the Title attribute in the @Page directive to customise
I am intending to use SQLite 3 with PHP 5. I found this: http://packages.debian.org/etch/web/php5-sqlite3
I'm intending to use the new .NET 4 Code Contracts feature for future development.
I am still developing this function, but here is what I am intending it
I feel like I'm re-inventing the wheel here, but I need to find a
I was intending to create a splash screen like the one sported by Visual
I am intending to use the n-gram code from this article . The algorithm
I installed the RSE plugin in Eclipse intending to either use SSH or FTP
I am intending to use Core Data to store a static list of data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.