How can I make responsive design it ? basic methods | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2
17th Mar 2020, 3:20 PM
acb
4 Answers
+ 3
very basic method ? use viewport based measurement like vw, vh, vmin, vmax. i just randomly assign a value, so it may not looks right https://code.sololearn.com/W5tL50Hq0YSD/?ref=app
17th Mar 2020, 3:22 PM
Taste
Taste - avatar
+ 2
Thanks for your answer.
17th Mar 2020, 3:29 PM
acb
+ 2
best to do this is with @media in css for eg: /* Navbar links */ .topnav a { float: left; display: block; color: white; text-align: center; padding: 14px 16px; text-decoration: none; } /* On screens that are 600px wide or less, make the menu links stack on top of each other instead of next to each other */ @media screen and (max-width: 600px) { .topnav a { float: none; width: 100%; } } you can do as many breakpoints as you wish and add different styles for each breakpoint
17th Mar 2020, 8:24 PM
behindThePixels
behindThePixels - avatar
+ 2
Learn Bootstrap
18th Mar 2020, 10:22 AM
Shadman Sakib
Shadman Sakib - avatar