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

  • Home
  • SEARCH
  • 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 290095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:57:59+00:00 2026-05-12T05:57:59+00:00

i have a css prop like stated #menu li#selected { padding: 0 10px; margin:0;

  • 0

i have a css prop like stated

#menu li#selected { padding: 0 10px; margin:0; background:url(nav-tab-left.gif) bottom left no-repeat #90288d; height: 35px; }

after the li i need to display the second part of the image nav-tab-right.gif

i try

#menu li#selected:after { background:url(nav-tab-right.gif) bottom right no-repeat; }

but this returns inconclusive

  • 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-05-12T05:57:59+00:00Added an answer on May 12, 2026 at 5:57 am

    Building from your previous question‘s HTML.

    IE7 and below doesn’t support the :after pseudo-element. Use something like this instead:

    HTML:

    <li id="selected"><a href="http://www.">FAQ'S</a></li>
    

    CSS:

    #menu li#selected {
      padding: 0;
      margin:0;
      background:url(nav-tab-left.gif) bottom left no-repeat #90288d;
      height: 35px;
    }
    
    #menu #selected a {
      display: block;
      background:url(nav-tab-right.gif) bottom right no-repeat;
      height: 35px;
      line-height: 35px; /* Centers the text vertically */
      padding: 0 6px;    /* Gives 6px of horizontal padding to the text */
      margin: 0;
    }
    

    This will work in all browsers and doesn’t rely on :after which IE7 and below doesn’t support.


    Hover Variation

    Another advantage of using this method is that you can modify it slightly to allow for CSS rollover images that will be compatible with IE6 as such:

    HTML:

    <li id="selected"><a href="http://www."><span>FAQ'S<span></a></li>
    

    CSS:

    #menu li#selected {
      padding: 0;
      margin:0;
      height: 35px;
    }
    
    #menu #selected a {
      display: block;
      background:url(nav-tab-left.gif) bottom left no-repeat #90288d;
      height: 35px;
      padding: 0;
      margin: 0;
    }
    
    #menu #selected a span {
      display: block;
      background:url(nav-tab-right.gif) bottom right no-repeat;
      height: 35px;
      line-height: 35px; /* Centers the text vertically */
      padding: 0 6px;    /* Gives 6px of horizontal padding to the text */
      margin: 0;
    }
    
    /* Hovered, so let's change the colors and the images */
    #menu #selected a:hover {
      background:url(nav-tab-left-hover.gif) bottom left no-repeat #902B27;
    }
    
    #menu #selected a:hover span {
      background:url(nav-tab-right-hover.gif) bottom right no-repeat;
    }
    

    Yes, it does work on IE6 and below (and above) since a is the only element for which IE6 supports the :hover pseudo-class. It is also the reason why this method requires adding an additional <span> tag as we cannot target the <li> with :hover in a way which IE6 understands.

    I do recommend using CSS sprites instead of separate images for the hover effect, but to keep this example as simple as possible, I will keep it as such.

    For more information about CSS selectors support, see CSS – Contents and compatibility.

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

Sidebar

Ask A Question

Stats

  • Questions 147k
  • Answers 147k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer For code and check constraints: SELECT OBJECTPROPERTYEX (OBJECT_ID('MyProc'), 'ExecIsQuotedIdentOn') OBJECTPROPERTYEX… May 12, 2026 at 9:12 am
  • Editorial Team
    Editorial Team added an answer Greg's tip is good. You'll probably end up with some… May 12, 2026 at 9:12 am
  • Editorial Team
    Editorial Team added an answer You can certainly use JDO in such a situation, dynamically… May 12, 2026 at 9:12 am

Related Questions

I have a CSS class called grid which I place on my tables. I
I have a CSS like this ul { list-style-image:url(images/bulletArrow.gif); } ul li { background:
I have a CSS class defined, call it: <style type=text/css> .Foo { position: fixed;
I have a CSS class that makes my links look like nice looking buttons.
I have a css based asp.net masterpage. I am using a browse div located

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.