在居中对齐的div元素下对齐链接



我正在尝试对齐一个链接,

<a class='dotted' data-toggle='popover' data-placement='bottom' data-content='This server is hadnling everyones logins, if this server is down, you couldnt log in to Minecraft.' title='Logins server'>What does this do?</a>

在div元素下,wich具有以下样式属性:

.service {
    width:140px;
    height:100px;
    padding:1.2em 0;
    margin:0 0 .5em 0;
    border:3px solid#00AFED;
    border-radius:50%;
    display: inline-block;
    *zoom: 1;
    display: inline;
}    

问题是这个div重复了几次,并且是居中对齐的,我需要在每个div元素下直接对齐链接,我在互联网上搜索了一段时间,但没有找到任何有效的东西,所以任何帮助都会得到通知。

你不会那样说话吗:http://jsfiddle.net/Y7n2f/

  a.dotted {
    border-bottom: 1px dotted;
    color: #0088cc;
    cursor: help;
    position: relative;
    left: -130px;
    top: 80px;
  }

这对我来说很好,希望它能解决你的问题。

在css中添加此类:

.wrap_link{ text-align:center;}
.dotted{ display:block;}

尝试在此结构中添加链接

<div class="wrap_link">
<div class="service">
content/text
</div>
<a class='dotted' data-toggle='popover' data-placement='bottom' data-content='This server is hadnling everyones logins, if this server is down, you couldnt log in to Minecraft.' title='Logins server'>What does this do?</a>
</div>

最新更新