Apply CSS reset to table elements?

Posted on 2011-04-22
Medium Priority
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: http://blogs.sitepoint.com/code-html-email-newsletters/
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

ID: 35447140
It is good practice to have a known starting point, thus a good practice to use resets.

Accepted Solution

DotNetChano earned 1000 total points
ID: 35448530
Its good practice not to use tables ;)

Author Closing Comment

ID: 35453290

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

839 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