Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Inheritance: Making tables and forms toe the line
Old 08-01-2009, 08:29 AM Inheritance: Making tables and forms toe the line
TWD
TWD's Avatar
King Spam Talker

Posts: 1,183
Trades: 0
Ever had trouble getting your tables and forms to look consistent
across browsers?

Just found this brilliant article that will answer your prayers.
http://www.komodomedia.com/blog/2006...5-inheritance/

To cut to the chase here is the gist:

Form elements do not automatically assume the font characteristics
of their parents.

With a Strict DOCTYPE your table elements should
automatically inherit from the Body element but if
you are using Transitional DOCTYPE they won't.

Code:
input, select, table, text-area {font: inherit;}
Just drop that into your Reset Style Sheet and you are golden

font-family,
font-size,
font-weight and even
line-height

should all cascade down to those pesky elements.
TWD is online now
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-01-2009, 10:46 AM Re: Inheritance: Making tables and forms toe the line
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
I'd like to note here that putting a form inside a table isn't necessary. You can have very nice forms w/o sticking them into tables.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-01-2009, 10:55 AM Re: Inheritance: Making tables and forms toe the line
TWD
TWD's Avatar
King Spam Talker

Posts: 1,183
Trades: 0
Actually I wasn't suggesting that.

Tables and forms are merely the two types of page elements where
font inheritance is an issue.
TWD is online now
Reply With Quote
View Public Profile
 
Old 08-01-2009, 10:58 AM Re: Inheritance: Making tables and forms toe the line
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
I know you weren't suggesting it, but too many people seem to think that they have to put a form inside a table in order to get a 'nice' form.

The font inheritance is an excellent point .
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-01-2009, 11:16 AM Re: Inheritance: Making tables and forms toe the line
TWD
TWD's Avatar
King Spam Talker

Posts: 1,183
Trades: 0
Quote:
Originally Posted by LadynRed View Post
I know you weren't suggesting it, but too many people seem to think that they have to put a form inside a table in order to get a 'nice' form.
Ok. No harm , no foul

Its funny you know. When I started learning
how to code, CSS had already gone mainstream so
I just took it for granted that that was the way things
were done.


Then latter I discovered this whole Bizarro world of doing things with
tables.
TWD is online now
Reply With Quote
View Public Profile
 
Old 08-01-2009, 02:26 PM Re: Inheritance: Making tables and forms toe the line
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
You're actually lucky to have started that way, you didn't have to UNlearn anything to do with tables. I started this stuff way back in the mid-90's and tables was all we really had. I was more than happy to have another way to layout a page and say bye-bye to tables!!
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Inheritance: Making tables and forms toe the line
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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 2.00230 seconds with 12 queries