SourceTec Software

It is currently Mon Apr 21, 2014 11:37 pm

All times are UTC + 8 hours

Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Jun 03, 2013 3:14 am 

Joined: Mon Feb 04, 2008 6:40 am
Posts: 17
I'm having a problem when trying to make my website apply to the WC3 validator.

I have been using <table width="100%" cellpadding="0" cellspacing="0"> on all my websites to set passing and spacing to 0, but WC3 telles me this is old fashion and want me to use CSS.

When I use this:
border-collapse: collapse;
th, td
padding: 0;

The borders and padding in my menu also disapairs :/ Is there any way to prevent this from happening?

I have uploaded a Before/After picture here,

PostPosted: Mon Jun 03, 2013 9:16 am 
User avatar

Joined: Mon May 10, 2004 3:53 am
Posts: 1752
Location: Rescue, CA, USA
As you discovered, table tags in a stylesheet can cause problems because DHTML Menu uses tables internally. The best solution is to use DIVs and CSS for layout instead of tables. However, if you want to continue to use tables, <table width="100%" cellpadding="0" cellspacing="0"> is valid code. I'm not sure which DOCTYPE you are using, but try placing the following at the very top of your page instead of any DOCTYPE you might have been using:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

You can see an example at and the W3C Markup Validation Service says, "This document was successfully checked as XHTML 1.0 Transitional!"

EDIT: I just thought of something... If you're using HTML instead of XHTML the DOCTYPE I suggested will generate all sorts of validation errors. If you're using HTML, please substitute the following DOCTYPE for the one I suggested:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">


Unofficial DHTML Menu Resource Site

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 8 hours

Who is online

Users browsing this forum: No registered users and 18 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group