Hover button, background same color, text color changes on hover (3 posts)

  1. Billy2209
    Posted 1 year ago #

    I am trying to make a button with a green background. The text would change color on hover (background stays the same, only the text color changes). I tried the code below but it does not work :-(.

    In the Tempera Theme Custom CSS:
    .greenbutton {
    font-family:"Trebuchet MS", Helvetica, sans-serif;
    background: #82B607;
    font-size: 20px;
    display: block;
    width: 250px;
    text-decoration: none;
    padding: 10px;
    .greenbutton a {
    color: white;
    .greenbutton:hover a {
    color: #e619d5;

    In the page html:
    <div class="greenbutton"><center><a href="https://www.......com" target="_blank">my text</a></center></div>

  2. ZedCryout
    Posted 1 year ago #

    Place the greenbutton class on the a, not the div and adjust the CSS accordingly.

  3. Billy2209
    Posted 1 year ago #

    Ok like <a class="greenbutton"....

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic