Skip to content

Tags

#css

CSS layout, Grid and Flexbox, responsive design, animation and the cascade.

11 posts

Posts tagged #css

  1. Question

    paano po gawing 3 columns sa laptop tapos 1 column sa phone? (CSS grid)

    sorry po if basic question 😭 kakatapos lang ng shift ko kaya medyo lutang pa. practice project ko po is portfolio page na may project cards. gusto ko 3 columns sa laptop, 2 sa tablet, 1 sa phone. ginawa ko po 3 media queries pero ang dami tapos may weird na gap sa tablet size: .projects { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; } @media (max-width: 900px) { .projects { grid-template-columns:…

    Ana Liza Mercado5likes6comments

  2. Question

    auto-fill vs auto-fit in css grid, i still dont get it

    i have this card grid and i read like 4 articles and still cant tell what the difference is .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; } auto-fill and auto-fit look EXACTLY the same on my screen. when does it actually change something? feels like im missing something obvious

    Kevin Tran2likes2comments

  3. Article

    :has() en CSS: el selector padre que pedimos durante 20 años (y 6 cosas que ya hago con él)

    Durante años la respuesta a "¿se puede seleccionar el padre en CSS?" fue "no, usa JavaScript". Ya no. :has() funciona en todos los navegadores modernos desde finales de 2023 (Firefox fue el último, en la versión 121) y yo ya lo uso en producción sin miedo. La idea: A:has(B) selecciona A si adentro tiene algo que cumpla B. Van mis usos favoritos: 1. Tarjetas con o sin imagen .card:has(img) { grid-template-rows: 180px…

    Sofía Ramírez11likes9comments

  4. Question

    Tab key skips all my buttons in Safari but works in Chrome, is it a focus-visible problem?

    I have a doubt that is making me crazy. In our checkout, when I navigate with the keyboard in Chrome and Firefox everything works: Tab goes to inputs, buttons and links, and the focus ring appears. In Safari on Mac, Tab jumps only between the text inputs. The buttons and links are completely skipped, like they don't exist. I thought it was my CSS, we have this: button:focus { outline: none; } button:focus-visible {…

    Mariana Costa2likes3comments

  5. Question

    my card looks fine on the page but gets squished in the sidebar?? do i need container queries

    hi all 🦉 1am here, kids are asleep, coffee #3. building a recipe site for practice and i have a recipe card, image on the left and text on the right. on small screens it stacks. i did it with a media query like teh tutorial said: .card { display: flex; flex-direction: column; gap: 1rem; } @media (min-width: 600px) { .card { flex-direction: row; } } on the main page it looks great. but i also show the same card in…

    Jen Hayes11likes8comments

  6. Experience

    what coding after bedtime actually looks like (a real log from last night, mom of 3 edition)

    so people keep asking me how i "find time" to learn to code with 3 kids and a full time job and honestly i dont find it, i steal it. here is last night, exactly as it happened, becuase i wrote it down as a joke and then thought maybe someone else needs to see that its messy for everyone lol 8:52pm all three in bed. husband left for night shift at the plant at 9. dishes can wait. they always wait. they're very…

    Jen Hayes54likes14comments

  7. Article

    How to center a div: 5 methods, ranked by how much they made me cry

    Everybody laughs at "how do I center a div" until they are the one at 11pm with a client on WhatsApp asking why the logo is "small small shifting to the left". I have been that person. So this is the post I wish I had when I started. The code is real and it works. The tears are also real. 5. position: absolute + transform (the old faithful) .parent { position: relative; } .child { position: absolute; top: 50%; left:…

    Kelechi Nnaji40likes15comments

  8. Article

    Our design system had 47 greys. Now it has 9 (and some semantic tokens)

    Allora. Last month I opened our Figma library and counted the greys. Not the colours, only the greys. 47 ✨. Forty-seven! Some were different by one hex digit, like #F4F4F4 and #F5F5F5, and both were used in production for "background light". Boh. This is how we cleaned it, in a fintech app with two squads, one designer (me) and a lot of developpers who are very patient with me. 1. The audit (boring, necessary) I did…

    Giulia Bellandi10likes8comments

  9. Article

    Flexbox o Grid: cómo decido en 10 segundos (con el código que sí uso en la chamba)

    Cada semana alguien en la chamba me pregunta "¿esto lo hago con flex o con grid?". La respuesta de libro es "flex para una dimensión, grid para dos". Está bien, pero a mí me sirve más esta otra: Si el contenido manda el tamaño, flex. Si el layout manda el tamaño, grid. O sea: con flex los elementos dicen "yo mido esto" y el contenedor se acomoda. Con grid el contenedor dice "aquí hay 3 columnas" y los elementos se…

    Sofía Ramírez10likes6comments

Get the best of Dynamo Geeks weekly

One email each Monday with the most useful posts. No spam; unsubscribe in one click.