how to remove border of a hyper-link image?

后端 未结 5 580
逝去的感伤
逝去的感伤 2020-12-29 23:27
  • Problem- image is getting displayed inside

    相关标签:
    5条回答
    • 2020-12-30 00:03

      The "border=0" solution works, but it is not very easy to implement since it requires its addition in every and each link image you put in your project.

      The better solution is to include the following tag within your page's <head>...</head> tags, which can be in a master page so that all the inner pages will inherent it from the master page

      <style type="text/css">
          <!--
          img { border: none; }
          -->
      </style>
      
      0 讨论(0)
    • 2020-12-30 00:17

      external css

      img {border : 0;}
      img a {outline : none;}
      

      internal css

      <style type="text/css">
        img { border: none; }
      </style>
      

      inline css

      <img src="logo.png" style="border-style: none"/>
      
      0 讨论(0)
    • 2020-12-30 00:17

      For removing this border you should set border to none.

        a img 
              {
              border:none;
              }
      
      0 讨论(0)
    • 2020-12-30 00:21

      You can set this CSS to remove the blue border on every image within a link:

      a img {
          border: 0;
      }
      
      0 讨论(0)
    • 2020-12-30 00:23

      Or add it inline to the img element:

      <li>
          <a href="#">
              <img style="border: 0;" src="images/hospitality.png" title="" />
          </a>
      </li>
      
      0 讨论(0)
    提交回复
    热议问题