Autor Tema: Requesting help - responsive grid and making <img>'s fit into grid cells!!!  (Leído 78 veces)

Desconectado mariogomes

  • PHPerit@
  • *
  • Mensajes: 2
  • Karma: 0
  • Nuev@ PHPer@
    • Ver Perfil
I'm trying to use a grid to layout six pieces of information - each piece is represented by an image which should act as a link.

Removing the problem with images(and links) altogether - I have a question about how to implement the following logic:

if (viewport)width >= x, then grid is a 2 x 3 (rows by columns)

elseif width < x && width >= y, then grid is 3 x 2

else grid is 6 x 1

I'm wondering if media queries are over the top? This is just a personal page to get myself acquainted with HTML and CSS (and JavaScript, btw), but I would like to at least try to do things "right".
youjizz pornhub tubegalore

My other question, which is related, is: How can I make background images fit each grid cell? I thought I had it done with `background-size: contain`, but I'm getting repeated images based on the cell size. I feel like this is a styling issue that is a bit over my head right now - but I'm trying to really push myself!
« Última modificación: 09 de Junio de 2019, 22:01:11 pm por mariogomes »

Comunidad PHPeros