Why is the paragraph not floating beside the profilePic?

后端 未结 3 645
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-23 13:55

Somehow, the paragraph is not floating beside the profilePic. It starts from the bottom of the profilePic. I am not able to understand why.

What is the mistake here?

3条回答
  •  有刺的猬
    2021-01-23 14:17

    It works fine even if

    is wrapped inside a . Defining width of resolves issue Please change styles as below

    .content
    {
        margin-top : 30px;
        margin-left: 20px;
        padding-bottom: 20px;
    }    
    
    .infoBit
    {
        width: 800px;
        /* float: left; */
        display: inline-block;
        font-size: 1.1em;
        padding-right: 10px;
        padding-top: 10px;
    }
    
    .profilePic
    {
        border:1px blue solid;
        height: 49px;
        display: inline-block;
        width: 49px;
        float: left;
    }
    
    .infoText
    {
        display: inline-block;
      width: 700px;
    }
    

提交回复
热议问题