I'm trying to style a table i'm retrieving from my database. I'm currently echoing it out like this:
echo "<table class='rwd-table'>";
echo "<tr><th>ID</th><th>Username</th><th>Name</th><th>Last Name</th></tr>";
while($row = mysqli_fetch_array($result)){
echo "<tr><td data-th='Movie Title'>" . $row['id'] . "</td><td data-th='Genre'>" . $row['username'] . "</td>
<td data-th='Year'>" . $row['first_name'] . "</td><td data-th='Gross'" . $row['last_name'] . "</td></tr>";
}
echo "</table>";
And my css like this:
.rwd-table {
...
tr {...
}
th {...
}
td {...
}
}
.rwd-table {
...
}
But the css doesn't seem to affect anything. I'm acctually trying to apply this: https://codepen.io/geoffyuen/pen/FCBEg To my situation. Please help.
CSSunless you use something likeSAS, so yourtrcant be nested like that it has to be.rwd-table tr{ ... }.rwd-table td{ ... }etc..SASis a parser library for the bootstrap library. So that's a bit more then I care to get into sass-lang.com