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

279
Visualizações
make container invisible but not content

I have a map and on the map i have zoom in and zoom out functionality, my question is how to make the red part invisible but not buttons, so when user searchs location on the map, this div should not block the view, only thos button should be visible.

english is not my mother language so could be mistakes.

import React from "react";
import ReactDOM from "react-dom";
import "./styles.css";
import styled from "styled-components";

const Toolbox = styled.div`
  display: flex;
  justify-content: end;
  width: 100%;
  max-width: calc(100vw - 60px);
  margin-bottom: 10px;
  background-color:red
  button {
    margin-left: 10px;
    width: 2em;
    height:2em
  }
`;
function App() {
  return (
   
          <Toolbox>
            <button onClick={''}>+</button>
            <button onClick={''}>-</button>
            <button onClick={''}>x</button>
          </Toolbox>
       
    
  );
}

const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);

it looks like this at the moment:

enter image description here

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

0

Use: position: absolute;

.Map {
  position: relative;
  background: #eee;
  min-height: 150px;
}

.Toolbox {
  position: absolute;
  right: 0;
  top: 0;
  background: red;
  padding: 10px;
}
<div class="Map">

  Here goes the map

  <div class="Toolbox">
    <button type="button">+</button>
    <button type="button">-</button>
  </div>

</div>

about 4 years ago · Juan Pablo Isaza Relatório

0

Have you tried removing the ‘background: red’ from your CSS?

about 4 years ago · Juan Pablo Isaza Relatório

0

Playing with her position will solve the problem.

position: absolute;

visit

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