Creating Customized HTML Text Area Boxes




HTML-Text-Boxes Its really important to keep everything as attractive as possible while writing posts. Text Area boxes are a useful method of showing long bunch of text or code on your blog. Just last month I wrote two posts 25 Vertical Navigation Menus and 30 Horizontal Navigation Menus where I have used a lot of coding and all those coding were displayed inside fully customized text areas that made the post looked clean and neat. Text boxes are good only if there length and height is well controlled and today with this tutorial we will learn several ways of styling our default text areas.

Kindly see a demo first,

 

Live Demo

 

Before

text-boxes

After

text-boxes

How to Customize the Text Area Box?

To do this follow the steps below,

  1. Go to Blogger > Layout > Edit HTML
  2. Search for </b:skin>
  3. And just above it paste the code below,

.mbt-textarea {
padding:0;
margin:0;
background: #fff;
width:400px;
height:40px;

color:#666;
font:12px arial;
border:1px dotted #289728; }

.mbt-textarea:hover {
color:#289728;
border:2px solid #666;
}

 

     4.  Finally save your template!

How to show the Stylized Text Area Effect inside Blogger Posts?

To display this customized text area you only need to add the following code in the Edit HTML section of your Blogger Editor,

<textarea class="mbt-textarea" readonly="readonly">WRITE-TEXT-HERE</textarea>

 

Simply replace WRITE-TEXT-HERE with your text that you want to appear inside a box.

How to Customize The CSS of The Text Box?

If you wish to change the font, color or in short the entire look of the text box then you just need to edit the following areas in the CSS code above,

background: #fff; –> This Changes background color of the text area
width:400px; –> This changes width size of box
height:40px;  -> This changes box height

color:#666;  -> This changes font color inside text box
font:12px arial; –> This changes font size and font family respectively
border:1px dotted #289728; } –> This changes the border size, style (i.e dotted, solid, dashed) and color. Editing it will change the look of the border/outline across the text

.mbt-textarea:hover {
color:#289728; –> This changes font color on mouse hover
border:2px solid #666;  -> This changes border size, style and color on mouse hover

Now Simply edit the above codes as guided and create a perfectly suiting Text box for your beloved blogs. I hope it will be as interesting for most of you as it seems :> Do not hesitate to ask for any help if needed!

No comments:

Post a Comment