...

View Full Version : Call to action button, CSS/HTML question. Help!



mbutterworth
04-26-2011, 10:22 AM
*** I've originally posted this on the wordpress forum but to no avail, hoping you guys and girls can help, thanks ***

Hi,

I'm hoping someone can help me. I know it's going to be incredibly simple...but it I'm new to this. Thanks.

I've created a simple rollover button using some code I found that takes my users to a Get in Touch page, which works great.

Using this code the image is referenced in the CSS, which is fine for one button but I'd like to create multiple buttons with different graphics, so therefore I'd like to be able to reference the image location within the html instead.

I've copied the code I've used below.

How can I reference the image in the html instead? Also, does anybody have a better way to create/manage buttons that the way I'm doing it? Thanks again.

CSS

* rollover
*/

a.rollover {
display: block;
width: 200px;
height: 200px;
text-decoration: none;
background: url("/wp-content/uploads/buttons-test/buttons.gif");
}

a.rollover:hover {
background-position: -200px 0;
}

.displace {
position: absolute;
left: -5000px;
}

*/

Widget HTML

[CODE]

<a href="/getaquote.php" title="Get a quote"><span class="displace">Get a quote</span></a>

[CODE]

abduraooft
04-26-2011, 10:37 AM
Set a class or id to the links and change then alter the CSS sectors, say

<a href="/getaquote.php" title="Get a quote" id="getquote"><span class="displace">Get a quote</span></a>


#getquote{
background: url("/wp-content/uploads/buttons-test/getquote.gif");
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum