Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

178
Visualizações
How do I get text to appear over a div

Good morning. I am currently working on a final project for my Unix class and it trying to implement some of the stuff learnt through building a web game. One feature that I want to incorporate is the ability to add text over a div as shown in the picture. How would I go about that?

image of result

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Try including some of your own source code next time, just so we get an idea of what you're having issues with.

But to put text over, try using position: relative, inside a div with a background image of what you want.

Eg.

.parent {
       background-image:url("https://picsum.photos/200/300");
       width: 800px;
       height: 800px;
    }

.text {
      position: relative;
      top: 20px;
      left: 40px; /*edit top, left, right, and bottom to change position*/
      
      font-weight: bold;
    }
    <body>
      <div class="parent">
        <p class="text">TEXT!</p>
      </div>
    </body>

If you can't use a background image, try using absolute positioning. Here's a great tutorial for that: https://www.youtube.com/watch?v=P6UgYq3J3Qs

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda