Subject: Ch 2 example 2-5 question
Posted By: Bo Post Date: 7/21/2006 9:20:18 AM
Hi Richard:
I have just started working from your book "Beginning CSS for Web Design" and kutos to you. Nice job, easy to read and understand concepts about CSS thus far. That said, I am running across a problem with example 2-4 and 2-5. For some reason, not sure yet, I am not seeing the border around the table in example 2-5. When I remove the declaration from the beginning of the file (just like in example 2-4), my border is there. I am using IE 6, Windows XP Pro, SP2 and have all patches loaded, if that that makes any difference. I have also attached my code, which I copied directly out of your book.

Any ideas???

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EM"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
    <head>
    <title>DocType Sniffing</title>

    <style type='text/css' media='all'>

        table { margin: auto; }
        td { background: green;
             margin: 10%;
             border: 5ps solid yellow;
             padding: 10%;
             width: 100%;
             color: black;
             font-size: 200%;
             text-align: center; }

        div { background: green;
              border: 5px solid yellow;
              font-size: 200%;
              padding: 1%; }

        #div1 { float: left;
            width: 30% }

        #div2 { margin-left: 34%;
            width: auto; }

        </style>
    </head>

    <body>

    <table>
         <tr>
        <td>Some Content</td>
           </tr>
    </table>

    <div id='div1'>This division smells funny</div>
    <div id='div2'>This division has a <em>strange</em> and
    rather pleasing odor about it.</div>

</br>

<p>I have tried several different DTD's with this example and the

results was the same in every case. Changing the declaration three

different ways didn't seem to have any effect on the results. What I do

not understand, is why there is no black (yellow) border around the

table?</p>
</br>
<p>When the declarations are removed from the beginning of the file, my

border returns and all is well.</p>
</br>
<p>In this example I am using IE 6.</p>


    </body>
</html>
Reply By: richard.york Reply Date: 7/24/2006 8:07:38 AM
You've got a typo on this line:

border: 5ps solid yellow;

It should be:

border: 5px solid yellow;

Hope This Helps!

Regards,
Rich

--
Author,
Beginning CSS: Cascading Style Sheets For Web Design
CSS Instant Results

http://www.catb.org/~esr/faqs/smart-questions.html
Reply By: Bo Reply Date: 8/15/2006 9:17:03 PM
Guess I should always recheck my typing before leaping off the bridge, in a manner of speaking. Anyway, thank you. It's always nice to have a second pair of eyes looking over your shoulder.
Reply By: richard.york Reply Date: 8/16/2006 7:44:01 AM
It's no problem, happens to all of us. ;-)


Regards,
Rich

--
Author,
Beginning CSS: Cascading Style Sheets For Web Design
CSS Instant Results

http://www.catb.org/~esr/faqs/smart-questions.html

Go to topic 48264

Return to index page 202
Return to index page 201
Return to index page 200
Return to index page 199
Return to index page 198
Return to index page 197
Return to index page 196
Return to index page 195
Return to index page 194
Return to index page 193