It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Partner Sites
Board index Programming CSS Forum

CSS change background image (href)

CSS change background image (href)

Postby maz00 on Wed Sep 23, 2009 2:12 am

Hi,

I have a box with a background image that changes on mouse over. How do I position a text in the box? 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 of the text some place in the a href box (30px left and right)? Can anyone help me out?

Thanks
Maz
maz00
 
Posts: 3
Joined: Sun Sep 13, 2009 11:01 pm

Return to CSS Forum

Who is online

Users browsing this forum: No registered users and 1 guest