Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Html Tags > Re: Table in a ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 378 of 439
Post > Topic >>

Re: Table in a <div> element style question

by David Dorward <dorward@[EMAIL PROTECTED] > Dec 2, 2005 at 07:09 PM

Joe Hesse wrote:

> I have two complete html files below.

They seem to be missing the (required) title element and the Doctype.

> When the first file is viewed with a browser both the paragraph and
> table are red.  When the second file is viewed with a browser only the
> paragaph is red.  I expected that both the paragraph and table would
> display as red in the second file since the <div> element encloses both
> of them.

Presumably the browser default style sheet has 
 
  table { color: black; }

in it then. So if you don't override it, the colour is black.

If you had a suitable Doctype then you would trigger standards mode, and
(in
Firefox at least[1]) gets the much more sensible

  table { color: inherit; }

instead.


[1] Its the only one I bothered to test

-- 
David Dorward       <http://blog.dorward.me.uk/>
  <http://dorward.me.uk/>
                     Home is where the ~/.bashrc is




 3 Posts in Topic:
Table in a
"Joe Hesse" <  2005-12-02 10:37:38 
Re: Table in a
David Dorward <dorward  2005-12-02 19:09:18 
Re: Table in a
Ed <ex@[EMAIL PROTECTE  2005-12-03 01:11:52 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 7:04:24 CDT 2008.