HTML 5 and Tables - Ugh!!!!!!!!!!!!

Post here if your message doesn't fit into another forum but is still about web development. Includes site critiques, web hosting and server questions, helpful software and resources, and more.
Post Reply
paulp575
Rank IV - Intermediate
Rank IV - Intermediate
Posts: 105
Joined: Tue Aug 09, 2005 1:20 pm
Location: Spokane WA
Contact:

HTML 5 and Tables - Ugh!!!!!!!!!!!!

Post by paulp575 »

Trying to update my personal web pages to HTML 5 and getting errors with a table that needs to have a border.

Not sure what's going on, but the specific problem is on the military.htm page - the table is "Unit Assignments" table.
I need to have lines in the table and want a cellpadding of 5 and a cellspacing of 0.

Help!!!!!!!!
Attachments
Paul Yelk New web Pages.zip
(465.71 KiB) Downloaded 5 times
paulp575
User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3606
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: HTML 5 and Tables - Ugh!!!!!!!!!!!!

Post by Albert Wiersch »

Hi Paul,

I took a look at the table you mentioned. Try changing this:

Code: Select all

<table cellpadding="5" cellspacing="0" border="1" class="TABLE-CENTERED">
to this:

Code: Select all

<table id="unitassignments" class="TABLE-CENTERED">
Then adding this CSS to the page's styles:

Code: Select all

table#unitassignments { border-collapse: collapse; }
table#unitassignments td { padding: .3em; border: 2px solid black; }
It should give the table a similar look to using the obsolete "border", "cellpadding", and "cellspacing" HTML attributes.
paulp575
Rank IV - Intermediate
Rank IV - Intermediate
Posts: 105
Joined: Tue Aug 09, 2005 1:20 pm
Location: Spokane WA
Contact:

Re: HTML 5 and Tables - Ugh!!!!!!!!!!!!

Post by paulp575 »

Thanks.

Appreciate the corrections.
paulp575
Post Reply