Jump to content

Set font-size for contentEditable grid ?


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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...