• 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

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

  • The topic ‘Call to action button, CSS/HTML question.’ is closed to new replies.