Jump to content

textarea inheriting font-size

Robert Moskowitz

Recommended Posts

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 


But can't figure it out.  Even tried without style:

<textarea readonly="readonly" onclick="this.select()"
sudo screen /dev/ttyUSB0 115200<br>

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...