r/csshelp • • Aug 05 '24

School Project - Help with CSS

Hey,

So, I'm doing this project for school where me and my group have to make this website, but Im having trouble finding awsners to some things (Hope I'm not being annoying by asking here)

I want this background image (the top part) to also appear behind the header but I just have no idea how to make this.

I'll put here the parts of the code related (Header and the div where the background is)

.cta {
    background: url(./Imgs_home/background.png);
    background-size: cover;
    height: 1026px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}





    <header>
        <div class="topoHeader">
            <a href="index.html" class="logo_header"><h1 class="logo_style">FARMED</h1></a>
            <div class="header_nav">
                <nav>
                    <ul>
                        <li>
                            <a class="ancoras_padrao" href="./Conteúdos/Carrossel/Carrossel.html">Conteúdos</a>
                        </li>
                        <li>
                            <a class="ancoras_padrao" href="./Jogos/HomeJogos/Homejogos.html">Jogos</a>
                        </li>
                        <li>
                            <a class="ancoras_padrao" href="./Sobre/sobre.html">Sobre</a>
                        </li>
                    </ul>
                </nav>
            </div>
            <div class="buscar">
                <img src="./Icones/Pesquisa.png" alt="Lupa de pesquisa">
            </div>
        </div>
        <hr class="divisor">
    </header>

    <main>

        <div class="cta">
            <h1>Agricultura</h1>
            <h2>Cultivando o futuro, alimentando o mundo</h2>

            <button id="descobrir">Descubra +</button>

            <button class="seta-baixo"><img src="./Icones/SetaBaixoPrenchido.png" alt=""></button>
        </div>
3 Upvotes

2 comments sorted by

View all comments

Show parent comment

2

u/panda_smit4 Aug 06 '24

Heyy
You totally got what I was trying to say! Sorry for not making it so clear I'm from Brazil but Im trying to get help and content in english cause its easier. Well I did exactly what you said and it worked just the way I wanted. Thank you so much!!!

And by the way, I'll try to use more chatgpt, its just cause sometimes it doesn't give me quite a good awsner and I get lost what I did have to change.