HighDots Forums  

Re: Table in a <div> element style question

alt.html.tags alt.html.tags


Discuss Re: Table in a <div> element style question in the alt.html.tags forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David Dorward
 
Posts: n/a

Default Re: Table in a <div> element style question - 12-02-2005 , 02:09 PM






Joe Hesse wrote:

Quote:
I have two complete html files below.
They seem to be missing the (required) title element and the Doctype.

Quote:
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


Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.