Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Designing a mobile site properly.

Featured Replies

Up till this point I haven't done much pre design in photoshop for my layouts (I can hear a lot of sighing). One reason because I'm an amateur and can't get anything to layout where I want it with css lol.

 

I'm going to design for a new site, but from hereon I'm doing everything for mobile first, what about you guys? Most of the people I know have Iphones, so I was going to model it around the Iphone 5. Now it's screen specs from apple are 1136 x 640px; but this does not take into consideration the toolbar in safari (back a page, forward a page, home etc).

 

I'm going to do a lot more design this time so the images are sized to fill the screen of the iphone5. What do you guys model around?

Start by building your site framework with just HTML and CSS for the lowest common denominator (eg 320px screen width). Set your page width to 100% so it fills the screen and style up your navigation and content area. Now when you view on larger viewports (eg 480px, 600px etc) the page will adapt to fit. Then when you reach your maximum view (eg desktop you can set a max-width for the page.

  • Author

Thanks Blue Dreamer, do you think mock-ups in photoshop are necessary?

 

Images; wouldn't you want to do the opposite? I'm starting to realize it's about screen ratio's on images, e.g. the width of iphone 5 600px multiply by ratio 1.775 = 1136px.

I naively chose 300px by 2000px for my images, thinking I was using a responsive lightbox (fancybox I think) I thought it would fill the screen, but it did not. It only brought the width 100% which was half the screen (actually less but just e.g.). I wish

 

I wish I spent more time planning and working this out, as I do not get the beauty of the pics on iphone 5.

 

Iphone 5 size in safari http://stackoverflow.com/questions/12463643/mobile-safari-on-iphone-5-visible-area-size

I design mobile-first these days using break points that tend to revolve around the iPhone, Kindle and iPad. The first breakpoint is usually set at 20ems and work from there. The sites scale down below the iPhone width as I also test on Blackberry but don't design for it.

 

As for PS mockups, I only really design for myself as a point of reference and usually make an HTML version for the client rather than show a static image (only recently been doing this though). In the past it was a case of designing three main versions in PS: mobile, Tablet, desktop. That took too long so now it's done in the browser. It's all about preference really. No right or wrong.

Add this meta tag:

 

<meta name="viewport" content="width=device-width">

 

...that will force the device to display as you would expect so you can control layout, there are many more attributes available for that tag but that's enough to get you started.

 

There's no ideal solution for images yet, though if you google around there are plenty of workarounds for producing different sized versions for various screen sizes. Although it's not ideal, and depending on the content needs, I often use a mid sized image for the "desktop" version (say a 600px wide photo), then use CSS to scale it down for smaller screens - this method is really about compromise offering a decent sized image on desktop and allowing an acceptable download time for mobile.

I design mine a little differently. Mobile first as that seems most logical, then some global breakpoints usually at 700px and 1000px. Trying not to be device specific as they are always changing and I'd rather not build a site target at a device that may be obsolete in a few years time.

 

Using SCSS and the ability to nest in breakpoints easily within the styles means that I can also create different, easy to manage breakpoints for specific sections. The reason being that not every element always requires the same breakpoint and this gives me more control.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.