2015-07-01 57 views
0

我有一个图片,它是下面的“图标”和一条灰线。你可以看到它在这里http://sundayeventsboutique.it/?lang=en通过CSS传递一张图片来传递图片

的标记线是非常简单的,自举类

<div class="row"> 
    <div class="col-md-4"> 
    <div class="row dmbs-header"> 
      <div class="dmbs-header-img"> 
       <a href="http://sundayeventsboutique.it/"><img width="300" height="150" alt="Sunday Logo" src="http://sundayeventsboutique.it/wp-content/themes/devdmbootstrap3/img/logo.jpg"></a> 
      </div> 
    </div> 
    </div> 
<div class="col-md-8 d-bar"> 

    <div class="row dmbs-top-menu"> 

     <nav role="navigation" class="navbar navbar-inverse"> 

     </nav> 

    </div> 
    </div> 
    <div class="hr-line-grey hr-line-margin"></div> 
</div> 

的问题是,我似乎无法能够移动的图像上方的线,如果我使用负上边距不移动,直到它顶端

enter image description here而我想对齐在“星期日事件精品”

+0

你不能移动HTML中的实际行元素吗? –

+0

我看到它是在“星期日活动精品店” – user3896501

+0

在您的网站上的一切看起来不错。 – Thyrun

回答

6

添加position:relative.hr-line-grey和调整top

.hr-line-grey{ 
position:relative; 
top:-63px; 
} 
+0

谢谢,这就是我所需要的 –

0
.hr-line-grey { 
overflow: hidden; 
height: 1px; 
width: 100%; 
background-color: #B5B5B6; 
margin: 20px 0px 12px; 
position: absolute; 
top: 120px; 
} 

更改类此。 此外,职位:相对将导致敏感问题。 你应该使用position:absolute。