Click to See Complete Forum and Search --> : postioning test in a href tag with background mouse over


Maz A
09-24-2009, 08:55 AM
Hi,

I have a box with a background image that changes on mouse over. How do I position a text in the box (maybe 20 pixel from the left and 20 from the right)? Please see the code below,

<style>
#someid a {
display: block;
height: 73px; width: 288px;
background: url(/images/image-off.png) no-repeat;
text-decoration: none;
color: #fff;
font-size: 11px;
font-weight: bold;
font-weight:normal;
}

#someid a:hover {
background: url(/images/image-on.png) no-repeat;
color: #000;
}
</style>
<body>
<p id="someid">
<a href="test">This is a test to see how this works. This is a test to see how this works.</a>
</p>

I like to maybe display 50 characters some place in the a href box? Can anyone help me out?

Thanks
Maz

cfajohnson
09-27-2009, 06:15 PM
Hi,

I have a box with a background image that changes on mouse over. How do I position a text in the box (maybe 20 pixel from the left and 20 from the right)? Please see the code below,



margin-left: 20px;
margin-right: 20px;




<style>
#someid a {
display: block;
height: 73px; width: 288px;

How do you know that the text will fit into a box that size in my browser (or anyone else's)? You don't know what my default font size is.