2016-09-11 7 views
-1

私はセンターによるクラス=「テーブル」とテキスト「については、表を」揃えるしようとするが、何も起こりません、私はそれは多分要素の位置に関連付けられていると思います。ここでは幅することはできませんここでは、中心

.table{ 
     position:relative; 
     margin:5px; 
     width:100%; 
     text-align:center; 
} 

は、私は、フロントエンドでは非常に初心者ですので、厳密に判断してはいけないcodepen

です。

+0

私はスニペットがそれに – Gowtham

+0

@Gowthamのおかげで多くのことを見て添付しています! – Astralpirate

答えて

1

body{ 
 
    background-color: grey; 
 
} 
 

 
.menu{ 
 
    width:300px; 
 
    height:400px; 
 
    background-color:white; 
 
    position:relative; 
 
} 
 

 
.lupe{ 
 
    float:right; 
 
} 
 

 
.arrow{ 
 
    float:left; 
 
    margin-bottom:157px; 
 
} 
 

 
.ball{ 
 
    position:relative; 
 
    left:10px; 
 
    margin:20px; 
 
} 
 

 
.table{ 
 
    position:relative; 
 
    margin:5px; 
 
    width:100%; 
 
    text-align:center; 
 
}
<div class='menu'> 
 
    <button class='arrow'><img src=http://iconspot.ru/files/216453.png width=20px height=5%></button> 
 
    <button class='lupe'><img src=http://s1.iconbird.com/ico/2013/9/452/w512h5121380477032search.png height=32px width=20px></button> 
 
    <div class='table'> 
 
    <img class='ball' src=http://i.imgur.com/f3axIAv.png> 
 
    <a >Table for</a> 
 
    </div> 
 
</div>

関連する問題