[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

How do you make website layouts that work for both desktop monitors

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 8
Thread images: 1

File: 1412843268742.jpg (55KB, 957x621px) Image search: [Google]
1412843268742.jpg
55KB, 957x621px
How do you make website layouts that work for both desktop monitors and mobile phones? I want something like Github or Digital Ocean, a simple top bar that transforms to a drop down menu if the window or screen is small.

But how the fuck do i determine the screen size when even chinkphones have the same resolution as most desktop monitors??
>>
You're are looking for "responsive" design. Check out Bootstrap, it'll do most of the work for you.
>>
>>58060347
Im not gonna use Bootstrap before i have better knowledge of css and js
>>
Just look up "responsive design" and copy the things that other people do.

>how the fuck do i determine the screen size
You don't, necessarily. You determine the browser through useragent. Mobile browser software = mobile device. Width in pixels also works. My desktop monitor is wider than it is tall. If I shrink my browser width to, say, 960px, some websites do indeed switch to mobile layout.
>>
>>58060333
Pajeet pls go, you can google that information in less than five minutes.

But I'll help you anyway. An easy way to do this is to use a CSS framework like Bootstrap, Materialize or Pure. They all come with some sort of a grid system that'll accommodate to the user's screen size if you have enough brains to follow the rules. Should you want to go deeper, try the CSS Flexbox feature, here's a guide for that https://css-tricks.com/snippets/css/a-guide-to-flexbox/

The pro of Flexbox is that it requires no external libraries, but it only works on modern browsers unless you include a polyfill (library that implements the feature in older browsers).
>>
Bootstrap rows and cols, literally all you need to make your shitty website responsive
>>
>>58060347
>>58060362
>>58060403
>>58060615
>all these bootstrap babbys
>>
phone browsers pretend to have a different screen size so that websites look ok given the physical display size

look up media queries and "meta viewport"
Thread posts: 8
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.