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 3 of 3 Topic 378 of 439
Post > Topic >>

Re: Table in a <div> element style question

by Ed <ex@[EMAIL PROTECTED] > Dec 3, 2005 at 01:11 AM

Joe Hesse wrote:
> Hi,
> 
> I have two complete html files below.
> The first one has an inline style in the <body> element.
> The second one has an inline style in the <div> element.
> Otherwise, the files are the same.
> 
> 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.
> 
> I have used Firefox, Mozilla, and IE, all with the same results.
> 
> Please help.
> 
> Thank you,
> Joe Hesse
> 
> ----- demo1.htm -----
> <html><head></head>
> 
> <body style="color:red">
> 
> <div>
> 
> <p>Some Text</p>
> 
> <table border="2">
>   <tr><td>Dog</td><td>Carrot</td></tr>
>   <tr><td>Cat</td><td>Spinach</td></tr>
> </table>
> 
> </div>
> 
> </body></html>
> 
> ----- demo2.htm -----
> <html><head></head>
> 
> <body>
> 
> <div style="color:red">
> 
> <p>Some Text</p>
> 
> <table border="2">
>   <tr><td>Dog</td><td>Carrot</td></tr>
>   <tr><td>Cat</td><td>Spinach</td></tr>
> </table>
> 
> </div>
> 
> </body></html>
> 
> 

Both files look the same to me.  Paragraph and table are red in both
files.

Run this in IE, Firefox and Opera.

Don't see the problem, so cant help you mate.

Ed.




 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 3:25:50 CDT 2008.