How to put an image next to each other

前端 未结 5 1891
醉话见心
醉话见心 2021-01-01 15:51

I\'m trying to put these two \'hyperlinked\' icons next to each other but I can\'t seem to do that. As you can see, the twitter icon falls to the next line.. (they are both

5条回答
  •  [愿得一人]
    2021-01-01 16:30

    Change div to span. And space the icons using   HTML

     
    

    CSS

    .nav3 {
    background-color: #E9E8C7;
    height: auto;
    width: 150px;
    float: left;
    padding-left: 20px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #333333;
    padding-top: 20px;
    padding-right: 20px;
    }
    
    .icons{
    display:inline-block;
    width: 64px; 
    height: 64px; 
    }
    
     a.icons:hover {
     background: #C93;
     }
    

    span does not break line, div does.

提交回复
热议问题