Error with Html/Bootstrap text alignment

Asked

Viewed 45 times

2

I’m having a problem with a website I can’t fix. I’m trying to make an information card without using a Bootstrap card because I want the image to be on the left side so I decided to do something similar but only with Rows and columns and it was like this: Exemplo do cartão de informação

However, I’m not getting the example name under Heading Name.

 <div class="row padInternalRow">
           <div class="col-5 border">
              <img class="img-fluid float-left" src="imagens\user.png" height="175" alt="Card image cap">
              </div>
           <div class="col-7 w-50">
              <div class="row border h-50">
                   <h5 class="text-left">Nome</h5>
                   <p class="text-left"><br />Nome exemplo</p>
              </div>
              <div class="row border h-50">
                   <p class="text-center">Funcao</p>
                   <p class="text-center"><br />Funcao exemplo</p>
              </div>
        </div>
   </div>

1 answer

0


Guy has some details in his code, first the BR within the P. After you put a height on container, but it does not need as you will see. In short I only removed things the more you put in the elements and includes the class flex-column in Row for the elements to be one below the other.

<link rel="stylesheet" type="text/css" media="screen" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" />

<div class="row padInternalRow">
    <div class="col-5 border">
        <img class="img-fluid float-left" src="imagens\user.png" height="175" alt="Card image cap">
    </div>
    <div class="col-7 w-50">
        <div class="row border  flex-column">
            <h5 class="text-left">Nome</h5>
            <p class="text-left">Nome exemplo</p>
        </div>
        <div class="row border flex-column">
            <p class="text-left">Funcao</p>
            <p class="text-left">Funcao exemplo</p>
        </div>
    </div>
</div>

  • Thank you so much! I’m still learning and I’m very beginner so sometimes I have these unnecessary things in the code but thank you.

  • @Legal Afonso that solved there, continue with the studies :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.