Apply CSS reset to table elements?

Posted on 2011-04-22
Last Modified: 2012-05-11
I'm in the process of creating my first HTML-based email mailer.  (I'll admit it; it's spam.)  

I've followed the suggestions found here:
1. I'm using a table for layout.
2. My CSS is all inline.

When mailed the HTML, I ended up with all sorts of extra spacing between TD elements.  I'd already set the table border, cellspacing, and cellpadding to 0, but the issue looked like a padding / margin issue.  So, I added table, tr, and td to my CSS reset.

div,h1,h2,h3,h4,h5,h6,p,pre,address,blockquote,span,ul,ol,li,dl,dd,dt,img,table,tr,td {
      margin:0;  /* CSS reset */
      padding:0;  /* CSS reset */

It worked!  Now here's the question, is it good practice or bad practice to always include table, tr, and td in CSS reset?  (I'm talking about pages that will be viewed with a browser as well.)
Question by:jdana
    LVL 12

    Expert Comment

    It is good practice to have a known starting point, thus a good practice to use resets.
    LVL 4

    Accepted Solution

    Its good practice not to use tables ;)

    Author Closing Comment


    Featured Post

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    Suggested Solutions

    CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
    This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
    The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
    HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now