Search code examples
htmlcssfirefoxopera

Element rendered differently in Firefox vs Opera


I am working on a website and I have encountered a problem that borders of elements are rendered differently on Firefox then on Opera.

I will be thankful for any suggestion on how to fix this.

Picture (Opera on the left, Firefox on the right)

EDIT: CodePen

HTML:

<div class="red-bordered-top-bar"></div>
<div class="red-bordered-bar" style="height: 256px;"></div>
<div class="red-bordered-bottom-bar"></div>

CSS:

.red-bordered-bottom-bar {
    position: relative;
    border-width: 0px 0px 15px;
    border-color: transparent;
    border-style: solid;
    border-image: url("../Resources/primary_bottom.svg") 15 15 15 15 round round;
    background-color: #33393E;
}

.red-bordered-bar {
    position: relative;
    background-color: #FE634A;
}

.red-bordered-top-bar {
    position: relative;
    border-width: 15px 0px 0px;
    border-style: solid;
    border-color: transparent;
    border-image: url("../Resources/primary_top.svg") 15 15 15 15 round round;
    background-color: #33393E;
}

Solution

  • Try to change 15 15 15 15 border image slice value :

    //top     
    -moz-border-image: url("https://dl.dropboxusercontent.com/u/35123963/primary_top.svg") 11 15 15 15 round round !important;
    
    //bottom
    -moz-border-image: url("https://dl.dropboxusercontent.com/u/35123963/primary_bottom.svg") 15 15 11 15 round round !important;
    

    -moz for mozilla browser