This forum is now read-only. Please use our new forums at discuss.codecademy.com.

CSS: An Overview Forum

View Course » View Exercise

239 points
F4797245f85d4702e57279a6259d1d81?s=140&d=retro
Submitted by
onionsouplight
about 2 years ago

table formating

How do I format the table so the players names are under each other. Right now Tom Brady is in the center of the table and the rest of the names are only a space away from either WR or RB row. I dont understand why my first table row looks so different from my last table row if they each have the same amount of tabe data in each one of them.
I hope I word this okay, Im sure you will understand what i mean if you copy and paste my code. Thank you in advance.

My html code is:

<head>
    <link type="text/css" rel="stylesheet" href="stylesheet.css"/>
    <title>Free Play!</title>
</head>
<body>
    <table>
        <thead>
            <tr>
                <th colspan="5"><h2><strong>New England Patriots</stong></h2><th>
            </tr>
            <tr>
                <th colspan="5">Depth chart</th
        </thead>
        <tbody>
            <tr>
                <td>QB<td>
                <td>Tom Brady</td>
                <td>Jimmy Garoppolo</td>


            </tr>
            <tr>
                <td>WR</td>
                <td>Danny Amendola</td>
                <td>Julian Edelman</td>
                <td>Matthew Slater</td>
                <td>Aaron Dobson</td>
            </tr>
            <tr>
                <td>RB</td>
                <td>Dion Lewis</td>
                <td>Brandon Bolden</td>
            </tr>
        <tbody>
    <table>

</body>

My CCS code is:
table {
background-color:000066;
color:ff0000;
}

thead {


0 votes

permalink

In your QB td-Tag
you forgot the closing-Tag like </td>

So change your

 <td>QB<td>

into

 <td>QB</td>

3645 points
5334fc819c4e9db930001a0d_32139218
Submitted by
Leon
about 2 years ago