1

I am trying to make a gradient for my table head, but it is not working at all. CSS: enter image description here

PHP + HTML

enter image description here

I still have my nooby table.

enter image description here

4
  • Please I'm desperate I'll give bounties
    – i_am_david
    Aug 9 '15 at 18:45
  • Where do you assign the class leaderboard to your table?
    – ChrisG
    Aug 9 '15 at 18:51
  • Oops just removed that, I did it in the table tag
    – i_am_david
    Aug 9 '15 at 18:52
  • It should work, did you clear the cache?
    – wallek876
    Aug 9 '15 at 19:56
1

I made something simple but I think you can tinker further on your own:

grad.html

<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="style.css">
    </head>
    <body>

        <div>
            <table id="grad1">
                <tr>
                    <th>Name</th>
                    <th>Number</th>
                </tr>
                <tr>
                    <td>Chris</td>
                    <td>123456789</td>
                </tr>
            </table>
        </div>

    </body>
</html>

style.css

#grad1 {
    width: 100%;
    height: 5em;
    background: -webkit-linear-gradient(#ffffff, #666666); /* For Safari 5.1 to 6.0 */
    background: -o-linear-gradient(#ffffff, #666666); /* For Opera 11.1 to 12.0 */
    background: -moz-linear-gradient(#ffffff, #666666); /* For Firefox 3.6 to 15 */
    background: linear-gradient(#ffffff, #666666); /* Standard syntax (must be last) */
}

output

output

You can learn more here: w3schools CSS3 Gradients

14
  • Thanks! Do you want a bounty when I can give it?
    – i_am_david
    Aug 9 '15 at 23:09
  • Did that, doesn't work.
    – i_am_david
    Aug 9 '15 at 23:58
  • I did shift + refresh, still didn't work.
    – i_am_david
    Aug 10 '15 at 0:00
  • If you copy paste my code as it is it doesn't work?
    – ChrisG
    Aug 10 '15 at 8:09
  • Yep, doesn't work.
    – i_am_david
    Aug 10 '15 at 15:55

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .