Support » Themes and Templates » Text becoming red when mouse cursor above it

  • Im using the code below to change the font of text but when i view the site and put the mouse cursor over the text, the text becomes red.

    In style.css

    .hentry .lr {
    font-family: Arial, sans-serif;
    font-size:16px;
    font-weight:bold;
    }

    In HTML code
    <a class="lr">Text Line 1</a>

    How do i make it so the text doesn’t become red when the mouse cursor is above it?

Viewing 13 replies - 1 through 13 (of 13 total)
  • look for the :hover class for those links, that’s what controls the rollover effect. More here:

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

    Thanks. This isn’t happening for a link though, it’s happening just on standard text.

    It says “a:hover MUST come after a:link and a:visited in the CSS
    definition in order to be effective”

    So how would i use a:hover for just standard text?

    Unless you provide a link to a page demonstrating the problem, no one will be able to offer much in the way of specific help.

    Here’s the link – http://www.officechairs-reviews.com/

    It happens on the text “Latest Reviews”

    That’s because the text “Latest Reviews” is enclosed in <a></a> tags:

    <a class="lr">Latest Reviews</a>

    Which tags do i need to enclose it in?

    Try <h3></h3> tags.

    Thanks. Another question;

    How do i remove the “Leave a comment” link under the post on the main page? I don’t want it removed from any other pages, only the main page. Is this possible?

    You’d need to edit your theme’s index.php template and remove the <?php comments_popup_link();?> tag.

    I looked in the index.php template but it doesn’t contain the code you mentioned.

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Should it be in index.php

    Try looking in loop.php but rather than removing the line, you’ll need to preface with a conditional along the lines of:

    <?php if( !is_home() ) comments_popup_link();?>

    I tried it but the Leave a comment is still on the main page.

    Here is the code i changed it to;

    <span class="comments-link"><?php if( !is_home() ) comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>

    Here’s how it was originally;

    <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>

    Any suggestions?

    Try:

    <?php if( !is_home() :?>
    <span class="comments-link"> <?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
    <?php endif;?>
Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Text becoming red when mouse cursor above it’ is closed to new replies.