I made a css example. The main parts where I am facing problems are:
#sign
{
font-size: xx-large;
color:white;
background-color:blue;
font-weight:bolder;
text-align: right;
position:right;
}
and I am implementing it like:
<div id="sign">Me and Me</div>
Here the background color is displayed like a band. Now I want the background color to be limited to only the text area “Me and Me”. What modifications do I have to do to acheive this?
Is there a reason that you can’t just set the background for whichever elements you want styled?
Using this link you can see that what you need is a
display: inline;call. I wrote up a quick jsFiddle for you to look at, this should be what you want…http://jsfiddle.net/NjAUR/
Seeing that you want it on the right hand side, get rid of the
position: rightdeclaration, and use afloat: right. Here is the updated version…http://jsfiddle.net/NjAUR/1/