Text next to brand

后端 未结 4 1553
生来不讨喜
生来不讨喜 2021-02-02 06:09

How do I get the Bootstrap Brand and any accompanying text to be treated together as the brand?

I have tried this:

4条回答
  •  攒了一身酷
    2021-02-02 06:34

    Not sure if this is correct html but I wrapped the image and text in a new div class and floated that left. Also changed the img to the new class with some padding on the right to space it from the text. Seemed to work for me but I am pretty new to bootstrap so it might not be exactly right. Your code would look like this.

    html

    
    

    add the new css class under the .navbar-brand class

    .navbar-brand-name > {
    
      display: inline-block;
      float: left;
    
    }
    
    .navbar-brand-name > img {
      display: inline-block;
      float: left;
      padding: 0 15px 0 0;
    }
    

提交回复
热议问题