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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T12:14:12+00:00 2026-06-02T12:14:12+00:00

When I apply border-radius and a background gradient to a <li> the rounded corners

  • 0

When I apply border-radius and a background gradient to a <li> the rounded corners look ragged and rough. Check it out on this jsfiddle

I’m seeing this in Chrome and FF. If I remove the gradient OR the border-radius the problem goes away.

Any ideas why this is happening and how I might fix it?

UPDATE:
I’m working on a jQuery solution that builds on Josh F’s idea (see his full answer below). It’s a simple jQuery function that appends a duplicate copy of the element behind it. At the moment, the scripts sets the positioning of the targeted element to relative. (I could see this being problematic in some cases.) My code is on jsfiddle here.

  • 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-02T12:14:13+00:00Added an answer on June 2, 2026 at 12:14 pm

    The current spec defines box-shadow to be drawn outside of the border-box. However, the background/border paints elements to the background, with no regard for other elements (it doesn’t paint with objects, only on top of). Since the element with the border-radius is drawn before the box-shadow, it draws the corner with a semi-transparent edge to cause the corner to look smooth (as it should). Regrettably, due to how the spec is worded for box-shadow, it is drawn after the element, and therefore painted on top of the page (after the element) with a semi-transparent edge. Normally, this would be fine, but since both the element and the box-shadow have a transparent edge on the same pixels, it causes the small, semi-transparent gap.

    This is a known bug, or has at least been considered a bug by the web design community. See Bugzilla Bug #474386 (specifically comment #6) for source of my information.

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

Sidebar

Related Questions

To create rounded corners on my container elements I use this CSS: border-radius:12px; -moz-border-radius:
when i apply this styles to option element: border-color: #8A8A8A #E5E5E5 #E5E5E5 #8A8A8A; border-style:
I want to make a layout with a rounded border. How can I apply
I want to apply a 3px top left & top right radius border. How
This issue is about the CSS3 border-radius property ( http://www.css3.info/border-radius-apple-vs-mozilla/ ) An example of
This works in Firefox, but for some reason the gradient doesn't apply in Safari.
How do you apply a drop shadow to a specific border edge? For example,
I'm using CSS3 PIE to add support for border-radius to IE6/7/8. It works perfectly,
When I apply this code to my CSS (which is a wrap that goes
I would like to add a border radius to a list of items but

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.