Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Border on div with gradient background

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #206390
    jonathanwilke
    Participant

    I have a div that has gradient background and a semi-transparent border. The problem with this is that on lighter edges the looks the way it should, but on the sides where the gradient goes darker the border looks lighter then the background though it is the same rgba(0, 0, 0, 0.1) border. Honestly i have no idea how to solve this, so i hope you can help me with this.

    Here’s the code:
    http://codepen.io/anon/pen/BNbMGE

    #206392
    bearhead
    Participant

    The only solution I can think of is to define the sides of the border separately, and make the right and bottom borders have a little more opacity.

    http://codepen.io/kvana/pen/QbooZp

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.