Latest Articles

How To Write Text On Colored Background : XML Tutorial

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 :

Click on the image to enlarge

Well, it is a simple procedure and today I am sharing a step by step tutorial with you :

Step 1) Open 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 {

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.


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.