I am trying to make a gradient for my table head, but it is not working at all.
CSS:
PHP + HTML
I still have my nooby table.
CS50 Stack Exchange is a question and answer site for students of Harvard University's CS50. It only takes a minute to sign up.
Sign up to join this communityI 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
You can learn more here: w3schools CSS3 Gradients
leaderboard
to your table?