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

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


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.


* 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


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


04-26-2011, 11: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>

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