How do I change font size for one <td> cell? I have made a html document. At the top, there is a style which says: body,td,th { font-family: Verdana; font-size: 15px; color: #4D4D4D; line-height:normal; } Notice that it applied to <td> also. So now, I have one particular <td> in a <table> for which I want to change the font size. How do I do this? Appreciate the help, JH
Use an id or a class (depending on whether you will want to use it exclusively for that particular cell or more). https://www.w3schools.com/css/css_syntax.asp
I tried that. On the top, I have: #intro { font-family: Verdana; font-size: 7px; color: #4D4D4D; } And within the <td> cell, I created a <div> like this: <div id="intro"> It still didn't change the text size. Any ideas? JH
Yes... put the id="intro" directly on the <td> in question... Although, since you've called it "intro"... I'm thinking that this perhaps is a heading, or something like that, which maybe should be a <th> instead? Since you're not providing any context, actual code, or information about the data you want to display, it's hard to say what the correct approach should be.
THIS... and also it's highly suspect that you're giving users with accessibility needs the finger with those stupid malfing px metric size declarations, font declarations with no fallback families... makes one wonder if you're even actually using tables for tabular data or are just slopping out tables for layout. Of course given the train wreck of how NOT to build a website that's in your signature, Christmas only knows how bad the code is on your current project.