Problem with a class in css and html

0

Well I have a problem when I call the background in the body {} it appears as it is in img:

ButwhenIusethesamecsscodeforadivorasectionitdoesnotappearanything.

howtoimg:

Wellthecsscodeinquestionisthis;

.slidee{margin:0px;overflow:hidden;background-image:url(../../image/BannerWithText.png);background-position:topcenter;background-repeat:no-repeat;background-attachment:fixed;background-size:100%auto;}

WhenIchangefrom.slidetobody{}itappearsnormal,butthesectioncalledclass="slide" does not appear anything ..

html code:

<!DOCTYPE html>
<html lang="pt-br">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>Secure Elo Bosting</title>
    <link rel="stylesheet" href="css/estilos.css">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/font-awesome.css">

    <script src="js/jquery-3.2.1.js"></script>
    <script src="js/main.js"></script>
</head>
<body>
        <header>
        <span id="button-menu" class="fa fa-bars"></span>

        <nav class="navegacion">
            <ul class="menu">
                <!-- TITULAR -->

                <!-- TITULAR -->

                <li><a href="#"><span class="fa fa-home icon-menu"></span>Inicio</a></li>

                <li class="item-submenu" menu="1">
                    <a href="#"><span class="fa fa-suitcase icon-menu"></span>Serviços</a>
                    <ul class="submenu">

                        <li class="go-back">Voltar</li>
                        <li><a href="#">MD10</a></li>
                        <li><a href="#">Elo Boosting</a></li>
                        <li><a href="#">Duo Boosting</a></li>
                        <li><a href="#">Vitorias</a></li>
                    </ul>
                </li>


                <li><a href="#"><span class="fa fa-envelope icon-menu"></span>Duvidas Frequentes</a></li>
                <li><a href="#"><span class="fa fa-tag icon-menu"></span>Contato</a></li>
            </ul>
        </nav>
    </header>
    <section id="slide">
<div class="slidee">
    </div>
    </section>
</body>
</html>
    
asked by anonymous 26.12.2017 / 15:51

2 answers

0

Good afternoon Felipe, this is because the body has a size in height of the whole body of the page, so you can see the image. In the class .slidee it does not have a size, so it does not seem to work, try setting a min-height in .slidee, something like this:

.slidee {   min-height: 300px; }

I believe this is it, try it!

    
26.12.2017 / 16:24
0

There are two possible errors, "possible because it depends on your intention. 1. If in CSS you are wanting to reference the ID that is in, you should reference it using "#". 2. If you want to reference the class "slidee", note that there are two "ee" (slide) in the HTML, so in the css it should look the same.

.slidee
{
    margin: 0px;
    overflow: hidden;
    background-image: url(../../image/BannerWithText.png);
    background-position: top center;
    background-repeat: no-repeat;   
    background-attachment: fixed;
    background-size:100% auto;
}
    
26.12.2017 / 15:59