5kyy8lu3 Posted August 29, 2009 Share Posted August 29, 2009 Hi. I set my table to a custom class. Like so .ColTitles {} The font color for everything in the table is set to blue according to this class I set. When I'm using a specific column to sort my table with, I use php to add a class="sortedby" to the anchor tab around that column name. The column name is inside a <td> which is inside that table. This changes the color of that column name so I can tell visually which column I'm sorting with since it'll be a different color. I tried it and it doesn't work. I checked the source and it's definitely putting class="sortedby" in the anchor tag and i check the style.css and i definitely uploaded the new on that includes that class. So... this leads me to believe I can't override the main table's class and it just inherits those font properties? I'm not sure what's going on, I know I can make this work with <font color=""> but I'd like to stick with css. Thanks ahead of time. Oh and I'm sure people will ask why I'm using table, i'm using it for tabular data, it's for my IP log table. UPDATE: ok i decided to just switch to using php to inject an inline style to the anchor tag for now, it worked, but I'd still like an answer to my original question, thanks =) Still not sure how this works but my previous method didn't lol. This didn't work: .sortedby a{ color: #f7f8b9; } <?php echo '<a class="sortedby">BlahBlahBlah</a> ?> but this did: <a style="color: #f7f8b9;">BlahBlahBlah</a> weird Quote Link to comment Share on other sites More sharing options...
5kyy8lu3 Posted August 29, 2009 Author Share Posted August 29, 2009 Don't mind my missing single quotes for the echo line, I'm tired and screwed it up and it won't let my modify my post, so go easy on me I tried to fix it lol. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.