I am trying to apply responsive design to my website

No description
No description
13 Replies
travel561
travel561OP12h ago
as you can see its all effed up how or where should I start?
forlorn_died
forlorn_died12h ago
Do you have the media query on your css?
travel561
travel561OP12h ago
what kind of media query do you reccomend?
forlorn_died
forlorn_died12h ago
I mean, if your media query has been called, your css will be overriden I'm not that sure about media queries for now because its been a long time since I did a responsive design up to movile scale
Jochem
Jochem12h ago
it's really going to help if you share your code, preferably in codepen check out #how-to-ask-good-questions for more tips on how you can share your code
Jochem
Jochem12h ago
I always recommend following Kevin's CRL course if you're struggling with responsive layouts. It's free: https://courses.kevinpowell.co/conquering-responsive-layouts
Kevin Powell
Conquering Responsive Layouts
Are you ready to take the challenge and finally figure out responsive layouts?  Click the button below and jump in!
Jochem
Jochem12h ago
as for what media query, the only real answer is that it depends. Media queries are a way to fix your site when it breaks at certain widths. Usually you go for either a minimum or maximum width for certain rules to apply. That depends on what design you made first, and how your site is breaking but CRL will give you a solid base in how to think about designs so you make them responsive from the start
travel561
travel561OP12h ago
thanks man that's really useful (:
Rowe2ry
Rowe2ry12h ago
To start, I'd recommend a quick pencil sketch in a notebook or making Figma mockup of what you want. Coding to a design usually yields better results than just coding something, looking at what shows up in the browser, and then asking yourself "What does this need?" When I did my personal portfolio site, I spent 3 days doing the Figma for it. Then I coded it out in another 3 days. If I had not invested the UI time in, the development would have taken much longer and with worse results.
travel561
travel561OP12h ago
I have that
travel561
travel561OP12h ago
No description
travel561
travel561OP12h ago
But its tough man even just that first part at the top, with the image and the text to the left still figuring that out
Rowe2ry
Rowe2ry12h ago
Okay, that helps to give guidance on what you're doing. For the hero section, I don't know what you want the mobile layout to look like, but you can start with using a grid layout to set the Text section (header, text blurb, and action button) and the image section. Make a top level container (<div>, <section>, etc.) for text and image contents, then place them in a parent container wiht the grid column and row definitions. Grid will give you control over how many rows and columns you want, gaps between them, and what size/ratios your colun and row widths are. Then using either grid-template-areas or grid-column-start/grid-column-end and grid-row-start/grid-row-end on the text and image containers to choose how they stack at different media queries. https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas
MDN Web Docs
grid-template-areas - CSS: Cascading Style Sheets | MDN
The grid-template-areas CSS property specifies named grid areas, establishing the cells in the grid and assigning them names.
Want results from more Discord servers?
Add your server