skip to Main Content

I need to do this :

enter image description here

And I have this: (The background color is only to check if the code is working).

enter image description here

My code is :

/*Barra de Navegação - Inicio*/
header{
    background-color: rgb(180, 177, 172);
}
.nav-link{
    margin: 6px;
    padding: 0px;
    color: white;
    padding-top: 10px;
}

.container-fluid{
    margin-left: 30%;
}
/*Barra de Navegação - Fim*/

/*Perfil - Inicio*/
#perfil div img{
    width: 100%;
    margin: 20px;
}

#textos-objetivos{
    margin: 20px;
    margin-bottom: 20%;
}

#textos-objetivos p {
    margin: 20px;
}
.negrito{
    font-weight: bold;  
}

.redesSociais{
    margin: 20px;
    display: inline;
}

.redesSociais i {
    background-color: chocolate;
}
/*Perfil - FIM*/
!DOCTYPE html>
<html lang="pt-br">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="https://kit.fontawesome.com/cac7eabb61.js" crossorigin="anonymous"></script>
        <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
        <link rel="stylesheet" href="style.css">
        <title>Document</title>
    </head>

    <body>
        
        <header class="container">

            <div class="row">
                <div class="col-12 col-md-6 menu">
                    <ul class="nav">
                        
                        <li class="nav-item">
                          <a class="nav-link" href="#">Perfil</a>
                        </li>
                        <li class="nav-item">
                            <span class="nav-link" >|</span>
                        </li>
                        <li class="nav-item">
                          <a class="nav-link" href="#">projetos</a>
                        </li>
                        <li class="nav-item">
                            <span class="nav-link" >|</span>
                        </li>
                        <li class="nav-item">
                          <a class="nav-link" href="#">experiência</a>
                        </li>
                        <li class="nav-item">
                            <span class="nav-link" >|</span>
                        </li>
                        <li class="nav-item">
                          <a class="nav-link" href="#">repositórios github</a>
                        </li>
                        <li class="nav-item">
                            <span class="nav-link" >|</span>
                        </li>
                        <li class="nav-item">
                          <a class="nav-link" href="#">Conteúdo</a>
                        </li>

                      </ul>
                </div>

                <div class="col-12 col-md-6 searchBar">
                    <nav class="navbar navbar-light">
                        <div class="container-fluid">
                          <form class="d-flex">
                            <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
                            <button class="btn btn-outline-success" type="submit">Search</button>
                          </form>
                        </div>
                      </nav>

                </div>
            </div>    
                

        </header>

        <main class="container">

            <div class="row" id="perfil">
                <div class="col-12 col-md-3">
                    <img src="imgs/eu.jpeg" alt="">
                </div>

                <div class="col-12 col-md-9">

                    <div class="row" id="textos-objetivos">
                        <h1>Thiago Soares Mota</h1>

                        <p><span class="negrito">Objetivos:</span> Lorem ipsum dolor sit amet consectetur adipisicing elit. Maxime numquam voluptatem exercitationem minima totam eaque ratione quasi facilis incidunt, iusto aliquid beatae impedit recusandae inventore possimus eum ipsa temporibus corrupti?</p>
                    </div>
                    
                    <div class="row redesSociais">
                        <h2>Redes Sociais</h2>
                        <i class="fa fa-facebook-official" aria-hidden="true"></i>
                        <i class="fa fa-twitter" aria-hidden="true"></i>
                        <i class="fa fa-instagram" aria-hidden="true"></i>
                    </div>

                </div>
            </div>

            <div class="row" id="projetos">

                <div class="row">
                    <h2>Projetoss</h2>
                    <div class="dropdown">
                        <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                          Dropdown button
                        </button>
                        <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
                          <a class="dropdown-item" href="#">Action</a>
                          <a class="dropdown-item" href="#">Another action</a>
                          <a class="dropdown-item" href="#">Something else here</a>
                        </div>
                      </div>
                </div>
                
                
                <div class="row cards">

                    <div class="card" style="width: 18rem;">
                        <img class="card-img-top" src=".../100px180/?text=Image cap" alt="Imagem de capa do card">
                        <div class="card-body">
                            <p class="card-text">Um exemplo de texto rápido para construir o título do card e fazer preencher o conteúdo do card.</p>
                        </div>
                    </div>

                  <div class="card" style="width: 18rem;">
                    <img class="card-img-top" src=".../100px180/?text=Image cap" alt="Imagem de capa do card">
                    <div class="card-body">
                      <p class="card-text">Um exemplo de texto rápido para construir o título do card e fazer preencher o conteúdo do card.</p>
                    </div>
                  </div>

                  <div class="card" style="width: 18rem;">
                    <img class="card-img-top" src=".../100px180/?text=Image cap" alt="Imagem de capa do card">
                    <div class="card-body">
                      <p class="card-text">Um exemplo de texto rápido para construir o título do card e fazer preencher o conteúdo do card.</p>
                    </div>
                  </div>

                  <div class="card" style="width: 18rem;">
                    <img class="card-img-top" src=".../100px180/?text=Image cap" alt="Imagem de capa do card">
                    <div class="card-body">
                      <p class="card-text">Um exemplo de texto rápido para construir o título do card e fazer preencher o conteúdo do card.</p>
                    </div>
                  </div>

                </div>

            </div>

        </main>

        <footer>

        </footer>

        <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ" crossorigin="anonymous"></script>

        <script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-W8fXfP3gkOKtndU4JGtKDvXbO53Wy8SZCQHczT5FMiiqmQfUpWbYdTil/SxwZgAN" crossorigin="anonymous"></script>
        <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-skAcpIdS7UcVUC05LJ9Dxay8AXcDYfBJqt1CJ85S/CFujBsIzCIv+l9liuYLaMQ/" crossorigin="anonymous"></script>
    </body>
</html>

I try put de line display: inline; in .redesSociais i and other places, but no workink. The code doesn’t seem to respond to the commands I put correctly. I aways have a display block. What is my mistaque ?

The post method asks me to put in more details. But I don’t have much more to complement. So I’m going to put more text here for the question to be approved.

2

Answers


  1. The reason it is not working is because you cannot have a row without a column in bootstrap.

    Right now you have

    <div class="row redesSociais">
        <h2>Redes Sociais</h2>
            <i class="fa fa-facebook-official" aria-hidden="true"></i>
            <i class="fa fa-twitter" aria-hidden="true"></i>
            <i class="fa fa-instagram" aria-hidden="true"></i>
        </div>
    </div>
    

    but it needs to just be:

    <div class="redesSociais">
        <h2>Redes Sociais</h2>
            <i class="fa fa-facebook-official" aria-hidden="true"></i>
            <i class="fa fa-twitter" aria-hidden="true"></i>
            <i class="fa fa-instagram" aria-hidden="true"></i>
        </div>
    </div>
    

    By removing the row class, it should solve the issue.

    Login or Signup to reply.
  2. .redesSociais i{
      display : inline !important;
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search