Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8753151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:22:24+00:00 2026-06-13T13:22:24+00:00

I am trying two create a rollover effect on my <li> with the background

  • 0

I am trying two create a rollover effect on my <li> with the background of the <li> Changing completely. The background on the none active state fits close but on rollover the background is off. below is my code.

HTML:

<div class="sidebox">
<ul>
<li><a href="http://2020mediaonline.com/wptest/wp-login.php">Log in</a></li>
<li><a href="http://2020mediaonline.com/wptest/?feed=rss2">Entries</a></li>
<li><a href="http://2020mediaonline.com/wptest/?feed=comments-rss2" >Comments</a></li>
<li><a href="http://wordpress.org/">WordPress.org</a></li>
</ul>
</div>  

Here is my css:

div.sidebox ul {list-style-type:none;font:12px arial;}
div.sidebox ul li{background: url(images/right_ul_bg.jpg) no-repeat left;padding:10px 0 0 50px;}
div.sidebox ul li a{text-decoration:none;color:white;display:block;height:31px; width:247px;}
div.sidebox ul li a:hover{ background:#2f373c url(images/right_ul_bg_hover.jpg) -10px -50px;}

here is a live example http://jsfiddle.net/cd7rR/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:22:25+00:00Added an answer on June 13, 2026 at 1:22 pm

    You’re putting the hover background image on the anchor. The original background image is on the list-item. The anchor is offset because you have padding declared on the list-item. Here’s a demo with the hover background on the list-item.

    div.sidebox ul li:hover{ background:url(http://2020mediaonline.com/wptest/wp-content/themes/Price_LawTheme/images//right_ul_bg_hover.jpg) no-repeat;}div.sidebox ul 
    

    http://jsfiddle.net/cd7rR/1/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying two create an existing project in the eclipse, but while running
I'm trying to create two side-by-side div elements, but I found that having an
I am currently trying to create two simple one-to-one mappings using Hibernate but somehow
I am trying to create two separate sessions- one for if the user is
I am trying to create two separate sessions- one for if the user is
I'm trying to create two ASP.NET Membership login pages for an ASP.NET website I'm
I am trying to create two different sets of settings for datepicker( http://keith-wood.name/datepick.html )
I am trying to create two select lists both filled with the same times.
I'm trying to create two functions: get & set, that both accept an arbitrary
I am trying to create two thumbnails of an image uploaded by user. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.