WEB DEVLOPEMENT #1902
gaurav kushwah (gauravkushwah8518-rgb)
started this conversation in
General
WEB DEVLOPEMENT
#1902
Replies: 1 comment
|
Media queries are definitely an important part of responsive design, but I wouldn't rely on them alone. A good modern approach is to build the layout mobile-first and combine several techniques:
For example, instead of creating separate desktop and mobile versions of a page, I usually start with the mobile layout and progressively enhance it: .container {
display: grid;
grid-template-columns: 1fr;
gap: 1rem;
}
@media (min-width: 768px) {
.container {
grid-template-columns: repeat(2, 1fr);
}
}So I would say media queries are still essential, but the bigger idea is to create fluid and flexible layouts that naturally adapt, and then use media/container queries when a specific layout change is actually needed. For someone learning responsive design, I'd focus first on Flexbox → Grid → mobile-first design → media queries → fluid sizing → container queries. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
'm learning web development and I'm trying to understand responsive design better. What is the recommended approach for building a responsive website today? Should I rely mainly on CSS media queries, or are there other techniques I should learn as well?
All reactions