从col-md-9中删除锚点并将其保留为仅图像

时间:2015-12-03 06:46:30

标签: html css twitter-bootstrap

我有一段像这样的代码

<div class="col-md-9 text-center">
  <a href="#">
   <img class="img-responsive" style="position: relative;
      width: 175px; display: inline; margin-top: 3px;
      margin-left: 448px;" src="/assets/header_other/reco.png">
  </a>    
</div>  

如果您看到图片已获得margin-left。我面临的问题是,由于其col-md-9,并且有一个锚标记,整个col-md-9充当锚标记。

我该如何解决。

1 个答案:

答案 0 :(得分:1)

试试这个 将此样式添加到锚标记

<div class="col-md-9 text-center">
  <a href="#" style="float:left;display:block;margin-top: 3px;
      margin-left: 448px;">
   <img class="img-responsive" style="position: relative;
      width: 175px; display: inline;" src="/assets/header_other/reco.png">
  </a>    
</div>  

现在只有图像的锚属性不是整个col-md-9 div

那是所有人