Full Slide Bootstrap

Asked

Viewed 312 times

1

Hello, I added a slide Carousel on the site I am developing, and I would like to have width: 100% in my header, but even adding this property does not apply, inserir a descrição da imagem aqui

Can you help me ?

This is my index:

<!DOCTYPE html>
    <html >
    <head>
        <meta charset="UTF-8">
        <title>Auto Jet - Serviços Automotivoss</title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="css/home.css">
        <link rel="stylesheet" href="css/geral.css">
        <link rel="stylesheet" href="css/plugins.css">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    </head>
    <body> 
        <header>
        <div class="container">
                <div class="logo">
                    <a href="index.html">
                        <img src="images/logo-home.svg" alt="logo topo">
                </div>
            <div class="links">
                <nav>
            <ul>
                <li><a href="index.html">Inicio</a></li>
                <li><a href="sobre.html">Sobre</a></li>
                <li><a href="servicos.html">Serviços</a></li>
                <li><a href="contato.html">Contato</a></li>
            </ul>	  
                </nav>
            </div>
            <div id="myCarousel" class="carousel slide" data-ride="carousel">
                <div class="carousel-inner">
                    <div class="item">
                        <img src="slide3.png" alt="Auto Jet - Serviços Automotivos" style="width:100%; height:524px;">
                    </div>

                    <div class="item active">
                        <img src="slide2.png" alt="Auto Jet - Serviços Automotivos" style="width:100%; height:524px;">
                    </div>

                    <div class="item">
                        <img src="slide.png" alt="Auto Jet - Serviços Automotivos" style="width:100%; height:524px;">
                    </div>
                </div>
                <a class="left carousel-control" href="#myCarousel" data-slide="prev">
                    <span class="glyphicon glyphicon-chevron-left"></span>
                        <span class="sr-only">Anterior</span>
                </a>
                <a class="right carousel-control" href="#myCarousel" data-slide="next">
                    <span class="glyphicon glyphicon-chevron-right"></span>
                        <span class="sr-only">Próxima</span>
                </a>
            </div>
        </div>
        </header>
    </div>
         <main>
              <section class="sobre">    
                    <div class="container">
                        <div class="itens">
                            <div class="imagem">
                                 <img src="images/logo-quem-somos.svg" alt="Logo Quem somos">
                            </div>
                        </div>
                        <div class="textos">
                            <p><strong>A AutoJet®</strong> é uma empresa especializada em serviços automotivos,atuando a mais de 10 anos no ramo de mecanica, com professionais capacitados para atender ao que for preciso para seu veiculo, visando atendimento rapido e efeciente...</p>
        
                            <a href="sobre.html" class="botao medio"> <i class="fa fa-eye" aria-hidden="true"></i> Continue Lendo</a>
                        </div>
                    </div>
              </section>
         </main>
        <footer>
            <div class="logo-rodape">
                 <a href="index.html">
                    <img src="images/logo-rodape.svg" alt="logo-rodape">
                 <a/>
            <p> Todos os Direiros Reservados Auto Jet Serviços Automotivos ® - 2017 </p>
            </div>
        </footer>
    </body>
    </html>

1 answer

0

Your slider does not occupy the whole area because it is inside a divwith a class="container" which does not allow him to occupy the entire area.

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>Auto Jet - Serviços Automotivoss</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="css/home.css">
    <link rel="stylesheet" href="css/geral.css">
    <link rel="stylesheet" href="css/plugins.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>

<body>
    <header>
        <div class="container">
            <div class="logo">
                <a href="index.html">
                    <img src="images/logo-home.svg" alt="logo topo">
              </a>
            </div>
            <div class="links">
                <nav>
                    <ul>
                        <li><a href="index.html">Inicio</a></li>
                        <li><a href="sobre.html">Sobre</a></li>
                        <li><a href="servicos.html">Serviços</a></li>
                        <li><a href="contato.html">Contato</a></li>
                    </ul>
                </nav>
            </div>
        </div>
        <div id="myCarousel" class="carousel slide" data-ride="carousel">
            <div class="carousel-inner">
                <div class="item">
                    <img src="slide3.png" alt="Auto Jet - Serviços Automotivos" style="width:100%; height:524px;">
                </div>
                <div class="item active">
                    <img src="slide2.png" alt="Auto Jet - Serviços Automotivos" style="width:100%; height:524px;">
                </div>
                <div class="item">
                    <img src="slide.png" alt="Auto Jet - Serviços Automotivos" style="width:100%; height:524px;">
                </div>
            </div>
            <a class="left carousel-control" href="#myCarousel" data-slide="prev">
                <span class="glyphicon glyphicon-chevron-left"></span>
                <span class="sr-only">Anterior</span>
            </a>
            <a class="right carousel-control" href="#myCarousel" data-slide="next">
                <span class="glyphicon glyphicon-chevron-right"></span>
                <span class="sr-only">Próxima</span>
            </a>
        </div>
    </header>
   
    <main>
        <section class="sobre">
            <div class="container">
                <div class="itens">
                    <div class="imagem">
                        <img src="images/logo-quem-somos.svg" alt="Logo Quem somos">
                    </div>
                </div>
                <div class="textos">
                    <p><strong>A AutoJet®</strong> é uma empresa especializada em serviços automotivos,atuando a mais de 10 anos no ramo de mecanica, com professionais capacitados para atender ao que for preciso para seu veiculo, visando atendimento rapido e efeciente...</p>
                    <a href="sobre.html" class="botao medio"> <i class="fa fa-eye" aria-hidden="true"></i> Continue Lendo</a>
                </div>
            </div>
        </section>
    </main>
    <footer>
        <div class="logo-rodape">
            <a href="index.html">
                <img src="images/logo-rodape.svg" alt="logo-rodape">
          </a>
                <p> Todos os Direiros Reservados Auto Jet Serviços Automotivos ® - 2017 </p>
        </div>
    </footer>
</body>

</html>

  • Thanks It worked correctly, the only problem is that I’m not getting my slide to take the header , the top part where this menu gets White, how can I solve this problem ?

  • @luismatheus tries to use the bootstrap itself Carousel will be better for your problem: http://bootstrap1.com/pt/examples/carousel.html . Or if you don’t want to use Carousel you can try putting a css:#myCarousel { position: relative; margin-top: -113px; width: 100%; z-index: -1;}

Browser other questions tagged

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