Robert Moskowitz Posted June 4, 2019 Share Posted June 4, 2019 I cannot figure out how to get a textarea to have the same font-size as the rest of a document, I have tried a lot of different things with style= following https://www.w3schools.com/cssref/pr_font_font-size.asp But can't figure it out. Even tried without style: <textarea readonly="readonly" onclick="this.select()" > sudo screen /dev/ttyUSB0 115200<br> </textarea> that text is smaller than the rest of the document. So please point me to the magic on setting the font-size right for a textarea. Link to comment Share on other sites More sharing options...
Robert Moskowitz Posted June 4, 2019 Author Share Posted June 4, 2019 Oh, the 'regular' style I would use is: style="border:1px solid black ;padding-top:1em;padding-bottom:1em; resize:none;margin-left:3em;width:20em;height:1em;overflow-y:hidden;overflow-x:auto;" Link to comment Share on other sites More sharing options...
Robert Moskowitz Posted June 4, 2019 Author Share Posted June 4, 2019 I just tried font-size:inherit; And that did not work. You can see the above textarea in http://www.htt-consult.com/CentOS7-armv7.html thanks Link to comment Share on other sites More sharing options...
Funce Posted June 4, 2019 Share Posted June 4, 2019 Font-size: inherit, only works if you've defined a font size earlier in the document. Because you don't, it doesn't do any different from the default, which is 13.3333px (on Chrome) You'll need to set the font-size on your <body> tag for inherit to work. Set it to 16 to start with. Link to comment Share on other sites More sharing options...
Robert Moskowitz Posted June 4, 2019 Author Share Posted June 4, 2019 Ah, <body style="font-size:16px;"> Made the difference. thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now