vmars316 Posted January 24, 2021 Share Posted January 24, 2021 Hello ; I want to Set font-size for contentEditable grid ; but as soon as I enter text , it reverts to some default size . Pls , how to fix this ? Thanks for your Help... <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title></title> <!-- https://www.freeformatter.com/html-validator.html --> <style> /* comment */ body { font-size: 16px; } .grid-container { display: grid; grid-gap: 2px; /*grid-gap*/ grid-template-columns: repeat( auto-fill, minmax(120px, 100%) minmax(120px, 100%) ); background-color: peachpuff; /*grid-background-color*/ padding: 4px; /*padding*/ } .grid-container > .div_div{ text-align: left; background-color: rgba(255, 255, 255, 0.8); padding: 4px; } .div_div { resize: vertical; height: 7000px; /textarea-height*/ Width: 100%; } p { text-align: left; } </style> </head> <body> <h5 contenteditable="true" style="text-align: center;" >Generated By Html-Grid-Maker</h5> <!-- comment --> <div contenteditable="true" class="grid-container" style=" class="text-align:left; font-size: 20px; "> <!--contenteditable--> <!-- <div contenteditable="true" class="div_div" style="order: 1;">1</div> --> <div class="div_div"style="order: 1;"><p>Row 1 Col 1</p></div> <div class="div_div"style="order: 2;"><p>Row 1 Col 2</p></div> </div> <br><br> </body> </html> Link to comment Share on other sites More sharing options...
dsonesuk Posted January 24, 2021 Share Posted January 24, 2021 (edited) class="grid-container" style=" class="text-align:left; font-size: 20px; " You can't see the problem here? Edited January 24, 2021 by dsonesuk Link to comment Share on other sites More sharing options...
vmars316 Posted January 26, 2021 Author Share Posted January 26, 2021 On 1/23/2021 at 4:51 PM, dsonesuk said: class="grid-container" style=" class="text-align:left; font-size: 20px; " You can't see the problem here? I do now , 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