0

I have founded many question like mine on StackOverflow example1 example2 but for a unknown reason I still have some borders displayed around my image:

enter image description here

 .imgCadenas{
  width:  50px;
  height: 50px;
  background: url('/cadenas.png');
  background-repeat: no-repeat;
  background-position: right;
  background-size: 100%;

  border:0;
  border-style: none;

  position: absolute;
  right: 150px;
  top: 5px;
}

Someone has a solution ?

[EDIT] with your advices I have this CSS in the browser: enter image description here

.liMachine {
    list-style-type: none;
    border-style: solid;
    margin-bottom: 5px;
    word-break: break-all;
    position: relative;

}

.imgCadenas{
  width:  50px;
  height: 50px;
  background: url('http://icons.iconarchive.com/icons/paomedia/small-n-flat/256/sign-check-icon.png');
  background-repeat: no-repeat;
  background-position: right;
  background-size: 100%;

  border: 0 !important;
  border-style: none !important;
  outline: none !important;
  display: block;

  position: absolute;
  right: 250px;
  top: 5px;
}

.whoLock{
  position: absolute;
  right: 15px;
  top: 10px;
}
<li class="liMachine switch">
        <div id="nameMachine">
            <h3>My machine</h3>
        </div>
        <div id="stateMachine">
            State:<span class="state">running</span>
        </div>
        <div>
            <img class="imgCadenas">
            <p class="whoLock">Locked by: StackOverflow</p>
        </div>
    </li>
Community
  • 1
  • 1
Jerome
  • 1,162
  • 2
  • 16
  • 32

4 Answers4

1

This can change on different browsers. You can try border-style:none !important;

So for all img:

img{border-style:none !important;}

or just for your img

<img class="imgCadenas" src"">

.imgCadenas{border-style:none !important;}

If you send your link for control. I can look for you.

Martin Evans
  • 45,791
  • 17
  • 81
  • 97
1

Try to modify like this:

.imgCadenas{
  width:  50px;
  height: 50px;
  background: url('/cadenas.png');
  background-repeat: no-repeat;
  background-position: right;
  background-size: 100%;

  border: 0 !important;
  border-style: none !important;
  outline: none !important;

  position: absolute;
  right: 150px;
  top: 5px;
}

EDITED

Your img element missing src attribute, Try to change img element to div element.

See also: https://stackoverflow.com/a/22097004/4964262

Community
  • 1
  • 1
jkythc
  • 420
  • 3
  • 12
1

Does adding !important to your CSS remove the border?

SLWS
  • 506
  • 4
  • 8
1

Try using.

img {
    border:none;
    outline:none
}