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.

How do you convert .psd file layer dimensions to web page dimensions?

Featured Replies

I've been given this .psd file that I need to convert into a html and css webpage, the dimensions of the layers within the file aren't shown, I can get the information of the .cm of each layer within the file but I can't get it in pixels to actually size it on the webpage, I can roughly estimate the size but they want it pixels perfect and I don't have a clue how to do that.

Teach them that pixel perfect is a stupid concept. :)

 

What exactly in the PSD do you need the exact measurment that the info panel can't get you?

 

This. Pixel perfect was a (somewhat) valid concept back in the days of fixed-width design. Now with responsive design it is a very bad philosophy to use. Try to achive pixel perfect you end up using a whole bunch of magic numbers and they are one of the worst things you can put in your CSS. Not only does this approach lead to hughely bloated css but it also leads to a maintenance nightmare in your css.

 

Magic numbers -> http://csswizardry.com/2012/11/code-smells-in-css/#magic-numbers

 

Use the design to get a general feeling or mood for how things are going to be, and use that as a basis for how you build things.

 

Here is a very good analysis of pixel perfect by David Walsh:

"Quality designers and developers tend to be perfectionists, that's why they do well. We do, however, get caught up in pixel perfection when we translate from design to working page -- likely because pixel perfection is achievable. The problem in focusing on pixel perfection is that the obsession leads to a lot of time that isn't enhancing the user experience, it's enhancing our ego. Of course other designers and developers will come to the site and notice the odd width or height issue, but 90+% of users would prefer we make performing a given task easier, not ensuring each column measures precisely. Of course I'm not advocating you create "landmine" sites with pixels off everywhere, but sometimes you need to file a bug to fix later and keep making your site more usable, accessible, and fun!
It's important that we don't lose sight of practicality when we try to stick to best practices. We can look sternly at a certain practices but what's most important is that we create functional, usable web sites. Never accept a rule without questioning its total validity and never be afraid to step outside rigid trains of thought!"

Edited by rbrtsmith

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.