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

213
Visualizações
Full page responsive image with HTML and CSS

i am trying the image to cover full page.

Vertical scroll : allowed

Horizontal scrolling : disallowed

Image : image must show full page without leaving border and responsive based on device size.

html, body, img {
  max-width: 100%;
  min-height: 100%;
  height: auto;
  width: auto;
  overflow-x: hidden;
}
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
</head>
<body>
<img src="example.png" />
</body>
</html>

The issues is, it leaving a blank space in all 4 side of the screen. How to fix this?

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

0

It may Help you :

 *{
    padding:0px;
    margin:0px;
    }

    img{
    width:100%;
    object-fit:cover;
    max-width: 100%;
    }
about 4 years ago · Juan Pablo Isaza Relatório

0

You can use the background image property Check here - W3schools

about 4 years ago · Juan Pablo Isaza Relatório

0

You have to reset the browser added styles to the body tag by removing the padding and margin from it, feel free to add this at the top of your styles:

body {
  padding: 0;
  margin: 0;
}
html, body, img {
  max-width: 100%;
  min-height: 100%;
  height: auto;
  width: auto;
  overflow-x: hidden;
}
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