Reply
table problem
Old 06-19-2007, 09:31 AM table problem
Novice Talker

Posts: 9
I recently changed my doctype declaration from short form to long form. Now Firefox isn't displaying the contents of the table correctly. Changing the doctype switched the browser from Quirks to Standards mode.

The attached file shows the problem. Is there any way to fix this without having to set P for margin=0? I would prefer not to make any changes to the paragraph tag as it would affect the whole site.
Attached Images
File Type: png codeproblem.png (17.2 KB, 14 views)
jfdt is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 06-19-2007, 09:34 AM Re: table problem
willcode4beer's Avatar
Webmaster Talker

Posts: 695
Name: Paul Davis
Location: San Francisco
Why not simply drop the paragraph tags from the table?
__________________
Paul Davis
willCode4Beer.com (coding for all the right reasons)
willcode4beer is offline
Reply With Quote
View Public Profile
 
Old 06-19-2007, 09:39 AM Re: table problem
Novice Talker

Posts: 9
I need some way to style the text... Can I specify font properties in the "td" class without specifying "td p"? And will not having paragraph tags cause issues for other browsers?
jfdt is offline
Reply With Quote
View Public Profile
 
Old 06-19-2007, 09:52 AM Re: table problem
Novice Talker

Posts: 9
Your response made me think... All I needed to do was setup a table class, and then specify a "td p" declaration. That is a good work-around, and keeps me from having to adjust the paragraph properties globally.
jfdt is offline
Reply With Quote
View Public Profile
 
Old 06-19-2007, 11:09 AM Re: table problem
karinne's Avatar
Extreme Talker

Posts: 197
Location: Quebec, Canada
Semantically speaking, you shouldn't have a <p> in there as there is not paragraph!?

Further more, that looks like a list to me ... what's it doing in a table!?

Loose the Transitional doctype and go Strict!
__________________
a web design portfolio - blog - last.fm - del.icio.us - widow's walk

Getting on the Web Standards band-wagon? Get these books - Designing With Web Standards and Web Standard Solutions

Takin' in the view from the outside. Feeling like the underdog. Watching through the window I'm on the outside. Living like the underdog.
-Dream Theater
karinne is offline
Reply With Quote
View Public Profile Visit karinne's homepage!
 
Old 06-19-2007, 02:28 PM Re: table problem
LadynRed's Avatar
Super Moderator

Posts: 6,555
Location: Tennessee
Quote:
Changing the doctype switched the browser from Quirks to Standards mode.
That's the way it SHOULD be.

Quote:
I would prefer not to make any changes to the paragraph tag as it would affect the whole site.
Not necessarily. While I detest tables for layout, there IS away to style a <p> inside. Give the table an ID or class, then make the changes in CSS to change ONLY those <p> tags inside that table.

Obviously the better solution is to not use tables for layout at all, and I agree with Karinne - use an unordered list instead of a table.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to table problem
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.15486 seconds with 13 queries