Yesterday I got a mail asking that how to write text on a colored background. As you can see that I have written text at the top. Have a look :
Well, it is a simple procedure and today I am sharing a step by step tutorial with you :
Step 1) Open Blogger.com and go to Layout and click on Expand Widget Templates
Step 2) All we have to do is to write a CSS code.
Just put the following code anywhere before </b:skin>
.alert-plain {
background:#FCF9CE;
color:#222222;
padding:4px;
text-align:left;
}
Step3) Now we have created the CSS code and its time to create a text with colored background. Whenever you want to write anything just use this div tag. Have a look below :
<div class='alert-plain'> Your Text Here</div>
This will look for the alert-plain class created above and your text will appear like this :
You can change the background to any color just by editing the CSS code.
2 comments:
hi gagan ,
Can we write it in any other colors
style="background-color: #eaf7ff;
I think if we put above in div tag we can get any color, just change the hex code. plus you don't need to play with css . This reminded me of classes and objects of C++.
Post a Comment
Comments posted on 84Productions are Moderated. Please do not use any abusive language.
Do not spam in comment box.
Thanks
Gagan