By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,785 Members | 1,072 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,785 IT Pros & Developers. It's quick & easy.

Inheritance and tables

P: n/a
Given

table#main {
border-collapse: collapse;
border: black 1px solid;
}

, why does the main table have borders around the outside only? IOW,
why won't the tr and td elements inherit the border property?

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Thu, 6 May 2004 18:16:07 +0000 (UTC), Christopher Benson-Manica
<at***@nospam.cyberspace.org> wrote:
Given

table#main {
border-collapse: collapse;
border: black 1px solid;
}

, why does the main table have borders around the outside only? IOW,
why won't the tr and td elements inherit the border property?


Because border doesn't inherit:

'border'
Value: [ <border-width> || <border-style> || <'border-top-color'> ] |
inherit
Initial: see individual properties
Applies to: all elements
Inherited: no

If you use 'collapse', you are not using the old-style HTML 3 table border
anymore. So if you want specific effects on table cells etc you better
specify them all yourself :)

--
Rijk van Geijtenbeek

The Web is a procrastination apparatus:
It can absorb as much time as is required to ensure that you
won't get any real work done. - J.Nielsen
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.