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 8474735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:42:12+00:00 2026-06-10T17:42:12+00:00

i’ll have a try on my first question. This is a problem, I had

  • 0

i’ll have a try on my first question.

This is a problem, I had a few times, but don’t exactly know, how to solve it:

I have a semitransparent background image (e.g. transparent rounded corners) which also as a gradient background color.
(In this example it’s a button for a dropdown navigation: When you hover the button, nav-list appears.)

Here’s the code:

    <div id="top-navi"><a id="top-navi-button" href="#" >Navigation</a>
     <ul>
      <li><a href='#'>bla</a></li>
      <li><a href='#'>blubb</a></li>
     </ul>
    </div>

CSS:

#top-navi {
    position: fixed;
    top: 0px;
    left: 6%;
    z-index: 1000;
}

#top-navi a#top-navi-button {
    float: left;
    width: 130px;
    height: 20px;
    padding: 5px 10px 5px 20px;
    background: url(../img/top-navi-button.png) no-repeat;
    color: #FFF;
    font-size: 120%;
    text-decoration: none;
}
#top-navi a#top-navi-button:hover, 
#top-navi a#top-navi-button:focus {
    text-decoration: underline;
}

The text on the button is white.
Because i want to make the site accessible, I don’t put the text on the image, but write it in html (so screenreaders can read it) and style it white.
This works pretty well until here.

Now, I want to make it even more accessible, so you can use all functionality, even if images are deactivated. If I do this (e.g. with FF developer toolbar) the background image disappears and you can’t see the white text anymore.

Now, if I give the link a background-color (in addiotion to the image) it laps over the transparent corners.
I also tried to put the text in a <span> and give it a background color, but as my image has a gradient, you see the background-color of the span then.

Any ideas how to solve that?
Thank you very much in advance!

Chris

  • 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-10T17:42:14+00:00Added an answer on June 10, 2026 at 5:42 pm

    You need an extra image for the non-transparent gradient part of the image. When you add the span to the link you can style the span to have the solid background and a fallback color.

    +------------------------------------------------+
    | a: Gradient and shadow                         |
    | +---------------------------------------------+|
    | | a > span: Solid gradient + background color ||
    | +---------------------------------------------+|
    +------------------------------------------------+
    

    So, HTML:

    <a id="top-navi-button" href="#"><span>Navigation</span></a>
    

    And CSS something like:

    a#top-navi-button {
      background: url(top-navi-button.png) no-repeat;
    }
    
    a#top-navi-button span {
      background: url(top-navi-solid_gradient.png) #00F;
    }
    

    Please note that if you want to create an accessible site you should also consider offering keyboard navigation. Right now you can’t use the Tab key to select any of the menu items.

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

Sidebar

Related Questions

This could be a duplicate question, but I have no idea what search terms
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I don't have much knowledge about the IPv6 protocol, so sorry if the question
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
Does anyone know how can I replace this 2 symbol below from the string

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.