Jump to content

Set font-size for contentEditable grid ?


vmars316

Recommended Posts

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

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...