Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

256
Vistas
css grid row height bound to view width

For any element this works perfectly height: clamp(100px, 2.5vw, 150px) which sets a minimum,a growing rate and a maximum height. How could we implement the clamp(MIN, VAL, MAX) css function to a row height ?

body {
  background: whitesmoke;
  border: solid black 1px;
  display: grid;
  grid-template-columns: auto auto auto;
  grid-template-rows: 125px;
  gap: 10px;
  padding: 10px;
}

.box {
  background-color: tomato;
}
<!DOCTYPE html>
<html lang="en">

<head>

</head>

<body>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>

</body>

</html>

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

Do you mean like this? Setting box to 100% height and then just using the clamp property in grid-template-rows.

body {
  background: whitesmoke;
  border: solid black 1px;
  display: grid;
  grid-template-columns: auto auto auto;
  grid-template-rows: clamp(300px, 3vh, 800px);
  gap: 10px;
  padding: 10px;
}

.box {
  background-color: tomato;
  height: 100%;
}
<!DOCTYPE html>
<html lang="en">

<head>

</head>

<body>
  
  <div class="box"></div>
  <div class="box"></div>
  <div class="box"></div>

</body>

</html>

about 4 years ago · Santiago Gelvez Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda