2016-08-12 3 views
1

이 상자를 서로 겹치지 않게 놓아 두도록 도와주세요. 이것은 매우 간단해야하지만, 어떤 이유로 나는 그것을 파악할 수 없습니다.가로로 항목을 정렬하는 방법

https://jsfiddle.net/DShepherd79/6qsg8g1L/2/

<body> 
    <div class="horAlign"> 
     <a class="rTableCell processMap"></a> 
     <a class="rTableCell sharepoint"></a> 
    </div> 
</body> 

.horAlign{ 
    background-color:black; 
    width: 500px; 
    position: absolute; 
} 

.rTableCell{ 
    padding:25px; 
} 

/*images Start Here*/ 
.processMap { 
    background:#08F80D no-repeat center; 
    display:block; 
    height:50px; 
    width:50px; 
} 

.sharepoint{ 
    background-color:purple; no-repeat center; 
    display:block; 
    height:50px; 
    width:50px; 
} 

/*Hover Images Start Here*/ 
.processMap:hover { 
    background-color:red; no-repeat center; 
} 

.sharepoint:hover { 
    background-color:blue; no-repeat center; 
} 

답변

1

변경 display:blockdisplay:inline-block

https://jsfiddle.net/6qsg8g1L/3/

+0

감사를 참조하십시오, 지금 내가 어떻게 그들에게 주어진 공간에 중심을 할 수 있습니까? –

+1

'.horAlign'에'text-align : center;'를 추가하십시오. – Rohit

관련 문제