Page Widget How to - Remove border around image








Question

We would like to know how to remove border around image.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.service {<!--  w  w w.j  a va 2 s  . c o m-->
  position: relative;
  float: left;
  clear: left;
  border: none;
}

.service a {
  border: 0;
}
</style>
</head>
<body>
  <div class="service">
    <div
      style="background-image: url('http://www.java2s.com/style/download.png'); background-position: 0 0; height: 200px; width: 200px; border: none"></div>
  </div>
</body>
</html>

The code above is rendered as follows: