in responsive web design it is better to use min-width or max-width which of the 2 is considered good practice because I have se | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

in responsive web design it is better to use min-width or max-width which of the 2 is considered good practice because I have se

30th Dec 2022, 12:28 PM
Oscar diaz
Oscar diaz - avatar
2 Antworten
0
In my opinion, it depends on what you're trying to style. min-width will only take minimum space needed, and can grow bigger. max-width is the opposite. For responsiveness media queries are used, which determine styles for the webpage when the screen is less than px of height/width, which are quite useful
30th Dec 2022, 12:41 PM
Lamron
Lamron - avatar
0
Max-width is really useful, especially if you want your element to not get out of the phone screen width. Min-width in my oppinion is good, but not as useful as max-width. You use it when you want a element to have "At least this dimension, and nothing less" (usually if the text gets out of the div border, so you set a minimum height/width)
30th Dec 2022, 12:42 PM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar