Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2011
    Thanked 0 Times in 0 Posts

    Call to action button, CSS/HTML question. Help!

    *** 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>


  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Thanked 2,224 Times in 2,211 Posts
    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");
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts