Solution: Notebook Style Textarea using HTML & CSS with source code, demo, and also how you can execute the full program easily. To complete the program you need to follow those steps given bellow
Live Demo
Also Helpful –
Create an Image Brightness Control Slider
Notebook Style Textarea using HTML & CSS
Description
Back to coding, To complete this program with debugging free code you have to create two files. The first file is to HTML and the second file gonna be CSS for the style part,
index.html
Create an HTML file named ‘index.html‘ and put those codes given below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
<!-- Coding Debugging (https://codingdebugging.com) --> <!DOCTYPE html> <html> <head> <title>Notebook Style Textarea - Coding Debugging</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- My Stylesheet --> <link rel="stylesheet" href="style.css"> </head> <body> <center> <textarea class="editable">Textarea: This is the first line. See, how the text fits here, also if there is a linebreak at the end? It works nicely. Coding Debugging. </textarea> <div class="editable" contenteditable>Editable Div: This is the first line.<br> See, how the text fits here, also if there is a linebreak at the end?<br> It works nicely.<br> Coding Debugging. </div> </center> </body> </html> |
style.css
Create a CSS file named ‘style.css‘ and put those codes given below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
@import url("https://fonts.googleapis.com/css?family=Reenie+Beanie"); html { height: 100%; } body { background-color: #f5f5f5; } .editable { color: #000000; border: 1px solid #EEEEEE; box-shadow: 1px 1px 0 #DDDDDD; display: inline-block; vertical-align: top; font-family: 'Reenie Beanie', cursive; font-size: 24px; line-height: 20px; margin: 2% auto; padding: 22px 20px 3px 40px; resize: none; min-height: 200px; width: 300px; background-color: #FFFFFF; background-image: -moz-linear-gradient(top, transparent, transparent 19px, #E7EFF8 0px), -moz-radial-gradient(4% 50%, circle closest-corner, #f5f5f5, #f5f5f5 39%, transparent 0%), -moz-radial-gradient(3.9% 46%, circle closest-corner, #CCCCCC, #CCCCCC 43.5%, transparent 0%); background-image: -webkit-linear-gradient(top, transparent, transparent 19px, #E7EFF8 0), -webkit-radial-gradient(4% 50%, circle closest-corner, #f5f5f5, #f5f5f5 39%, transparent 0%), -webkit-radial-gradient(3.9% 46%, circle closest-corner, #CCCCCC, #CCCCCC 43.5%, transparent 0%); -webkit-background-size: 100% 20px; background-size: 100% 20px; } |
Thank you for visiting!
We appreciate you for your precious time. I hope you are learn something from here! If you have any queries about this coding comment down below we will reply ASAP.
Keep coding, Keep debugging!