NAME YOUR TABLE- Code seems right, can't pass


#1

What am I missing here? The columns are the right size, but it keeps asking me to add a colspan attribute to the first line?


#2

Please post your code, in particular, the <thead> section with the <th>'s.


#3




<body>

    <table border="1px">
        <thead>
            <tr>
                <th colspan="3">3 columns> <Famous Monsters by Birth Year</th>
            </tr>
            <tr>
                <th colspan="2">2 columns> <Famous Monster</th>
                <th>Birth Year</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>King Kong</td>
                <td>1933</td>     
            </tr>

            <tr>
                <td>Dracula</td>
                <td>1897</td>
            </tr>

            <tr>
                <td>Bride of Frankenstein</td>
                <td>1935</td>
            </tr>
        </tbody>
    </table>

</body>


#4

<th colspan="2">Famous Monsters by Birth Year</th>

for the top row, for the next,

<th>Famous Monster</th>
<th>Birth Year</th>

#5

Not sure HTML supports units in attributes. border="1" is the old HTML way. Now that we have CSS, though, we can use a style attribute.

<table style="border-collapse: collapse; border: 1px solid #088">

#6

MTF,

I don't know what in the world is happening here, but this has gone completely haywire.

I made the changes you suggested, and I passed and clicked on next exercise. This morning went I logged back in, I am BACK on the same thing!

Not only that, but there is additional code in there that was not in mine last night.
I will post a screenshot of the correct pass screen from last night. You can see on that one, that, NONE of the additional code such as, th style, padding, px, etc is even there.




<body>

    <table style="border-collapse:collapse;">
        <thead>
            <tr>
                <th colspan="2">Famous Monsters by Birth Year</th>
            </tr>
            <tr style="border-bottom:1px solid black;">
                <th style="padding:5px;">Famous Monster</th>
                <th style="padding:5px;border-left:1px solid black;">Birth Year</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td style="padding:5px;">King Kong</td>
                <td style="padding:5px;border-left:1px solid black;">1933</td>     
            </tr>

            <tr>
                <td style="padding:5px;">Dracula</td>
                <td style="padding:5px;border-left:1px solid black;">1897</td>
            </tr>

            <tr>
                <td style="padding:5px;">Bride of Frankenstein</td>
                <td style="padding:5px;border-left:1px solid black;">1944</td>
            </tr>
        </tbody>
    </table>

</body>


Now, the additional code that is in there is somehow making the correct code you asked me to put in no longer work! On top of that, it's now asking me to make MORE changes, like changing the color and adding tags around Famous Monsters.

I have tried three different browsers, Safari, Firefox and Chrome and reset everything and I won't work. I am COMPLETELY lost here. HELP


#7


#8

Look at the output, does that look nice to you? Okay, lets break it down, we have the following code:

<tr>
  <th>Famous Monsters by Birth Year</th>
</tr>
<tr>
  <th>Famous Monster</th>
  <th>Birth Year</th>
<tr>

now we want or first th (<th>Famous Monsters by Birth Year</th>) to span two columns, so we can use colspan. To achieve this, we add colspan to the opening tag:

<th colspan="2">Famous Monsters by Birth Year</th>

simple as that. no need add 2> after your th opening tag


#9

Thanks very much! I became confused as 8 carried into 9, and I thought I was still on 8. Good Lord. I got it!


#10

So you can conclude that the author populated your code with style attributes in the following lesson, then?