The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

How do I make text in a page Hoverable (if that is a word). (4 posts)

  1. WPCL
    Posted 6 years ago #

    I would like to make the Click here to view our Products & Services so that it is one color when standing and another when hovered. Below is the code in pages HTML.

    <p style="text-align: center;">
    <h4 style="text-align: center;"> <span style="color: #0000ff;"><span style="color: #ff6600;">Click here to view our Products & Services</span></span></h4>
    <p style="text-align: center;"> </p>

  2. You mean you want to change the link color during mouseover?

    You do that via your theme's CSS code, changing the a:hover class

    See http://www.w3schools.com/CSS/css_pseudo_classes.asp

  3. WPCL
    Posted 6 years ago #

    Does that mean that it is not possible to change the code on a specific page instead of the theme? Being a rookie maybe I shouldn't ask this question but wouldn't it make sense that I would have the ability to add some sort of code to the above html string so that the words would change color upon a mouseover?

  4. It is possible to make an inline change but putting something in your CSS is better (or rather, it's deemed better, and at the end of the day, often easier to keep all your CSS and such in the css file, so if you change your mind later, it's easier to change without having to go to each template or post).

    Add the custom color to your css like this

    a.special:hover {color:#FF0000}

    And then make your link this:
    <a href="http://your.link.com/here" class="special">Click here to view our Products & Services</a>


    <div class="special">
    <a href="http://your.link.com/here">Click here to view our Products & Services</a>

Topic Closed

This topic has been closed to new replies.

About this Topic