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.

CSS for smartphones

Featured Replies

Hello all,

 

I'm pretty new to designing css for smartphones so can anyone point me to any online tutorials that cater for this?

 

I'm interested in creating a top down layout that starts with the logo at the top then has a series of drop down menus, for example, a sign in drop down tab, new user drop tab and so on, with each tab taking up the total width of the smartphone's screen.

 

If anyone knows of any handy books ranging from intermediate to advanced on this subject then please reply with the title of the book and I'll look them up on Amazon. Thanks.

  • Author

Thanks for the link Sash_007.

 

I wasn't specific enough in my first post. I've looked on Amazon at a few books that look ok but if anyone knows of any books on mobile css that nail the subject and give you that WOW factor then let me know. I've also looked on Google for mobile css and find some odd tutorials that really aren't that good. I'll keep looking though.

You can test your code in your browser window on your desktop / laptop. Just resize the window the check the layout at different screen sizes. You really need to know about responsive design and media querys if you are wanting to design for devices with small screens as they all differ in size.

 

I don't generally recommend everything be top down i.e. always span 100% of the screen on mobiles. If you look at well crafted app UI's the modules buttons etc are still laid out in a grid fashion, but perhaps modules spanning 50% as opposed to 25% on desktop. Our company used to design top down layout with everything being full width, and now we changed that to how I described above and our UI's are vastly improved now.

  • Author

Thanks for the post rbrtsmith,

 

I'm redesigning an existing site. I can change the mobile site to display the elements I want on my smartphone but for some reason the logo and text looks the same ratio as it does on the desktop site. The text also has the same ratio as the desktop. I'm going to play around with it for a while to get it right.

Thanks for the link Sash_007.

 

I wasn't specific enough in my first post. I've looked on Amazon at a few books that look ok but if anyone knows of any books on mobile css that nail the subject and give you that WOW factor then let me know. I've also looked on Google for mobile css and find some odd tutorials that really aren't that good. I'll keep looking though.

 

http://www.hongkiat.com/blog/responsive-web-tutorials/

Thanks for the post rbrtsmith,

 

I'm redesigning an existing site. I can change the mobile site to display the elements I want on my smartphone but for some reason the logo and text looks the same ratio as it does on the desktop site. The text also has the same ratio as the desktop. I'm going to play around with it for a while to get it right.

Have you got the following line in your header?

<meta name="viewport" content="width=device-width,initial-scale=1">

  • Author

Everything is nearly complete but there's one more obstacle. My desktop version has a jquery login box. This simply won't do for mobile phone sites, but in order to save space I want to design an expandable list. this is no problem from scratch I just want some advice on the best way to adapt a desktop to a mobile phone site.

 

Should I use the 'display:none' in my stylesheet to hide these elements? Then design an expandable drop down list from scratch or is there another way?

  • 2 weeks later...

you can find many important links form the google dear in an easy way.

You need to read about @media (media queries). That's the information you need to create a mobile version of a site with CSS.

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.