Try Tuts+ Premium, Get Cash Back!
5 Easy Ways to Prepare Your Web Designs for Coding

5 Easy Ways to Prepare Your Web Designs for Coding

Congratulations! You’ve designed your site and you feel like it’s ready to be sent off to a coding team. You might have a developer in mind, or you might be comparing the popular PSD > HTML shops that are out there… you might even plan to code it all yourself. No matter what solution you decide upon, there are a few tricks that I think every designer should know when they are preparing their designs to be coded into fully functional websites.

Philo Hermans is a freelance web developer from Utrecht, The Netherlands. He has over 9 years of experience and often works with designers to turn their designs turned into fully coded websites or web applications. Philo is also a successful plugin developer on CodeCanyon, and has written frequently at Nettuts+. With that introduction out of the way, let’s get started with the tips!


Tip 01: Make it “Pixel Perfect”

The theory behind creating “pixel perfect” comps can be stated like this: To us coders, what we see is what you get! Most coders won’t interpret your designs for you. If you hand over a design comp with mis-matching margins, padding, font sizes, colors, etc., most developers will code it exactly as we see it – including the errors! This can mean lots of frustration and wasted time (and money) making revisions; so save yourself a headache and send out pixel-perfect comps if you want pixel-perfect coding.

Prior to sending your design to the coding phase, take an hour or two to review it with a fine toothed comb.

The workflow solution here is simple – Prior to sending your design to the coding phase, take an hour or two to review it with a fine toothed comb. You don’t necessarily need to document your entire design (although some developers will require this), but taking care to make sure the following elements are exactly how you want them is crucial:

  • Margins: All margins between elements should more or less match up. If you intend all margins to be 25px, make sure that they are exactly 25px inside the design.
  • Padding: This is the same rule as with margins: make sure the padding inside elements is consistent with your intentions.
  • Font usage: Make sure that every time you use a font in the design, it’s exactly what you want to be coded – if you want “all paragraph text to be 10px Arial with 18pt line height”, make sure that each paragraph in the design is set in this exact way.
  • Colors: If you have an exact color in mind, whether it’s for a font, background, or anything else, make sure you use the exact hexadecimal value that you want used in coding.

It’s also worth taking a moment to set some “guidelines” inside the design files that you hand over. An easy way is to use a grid template like the 960.gs website provides. The guidelines in the grid template make sure that the widths of the elements are all precise. So instead of having a container that’s 957px wide, it will be the exact 960px that you intended.


Tip 02: Leave Notes

If you want something that’s not obvious, such as a navigation menu that has to slide down when you move your mouse to the top of the screen. Make sure that you make it clear by adding notes. There’s a few ways that you could do this (I’ve seen everything from PowerPoint documents to printouts with hand-writing on it), but my favorite way is actually pretty simple: Use the Note Tool in Photoshop (see image below). The note tool will automatically make notes show up when a developer opens up the file, and it’s easy quickly read up on what a designer has intended.

If you aren’t using Photoshop, that’s okay. Most graphics software that I’ve found (from Fireworks to Illustrator) have a similar way of adding notes. If for some reason this isn’t an option – just make your notes into a text file that you include with the files you deliver to the developer.


Tip 03: Include Designs for Interaction

The more detailed your design is in terms of interaction, the easier it is for a developer to code it. Be sure to add some examples of what your design will look like when it’s interacted with. Every design is going to be different, but the important interactions that shouldn’t be forgotten include:

  • Dropdown Menus
  • Link/Button Hover States
  • Image Sliders
  • Lightboxes
  • Tooltips
  • Form Elements

The reason behind this tip is this: if you don’t show a developer how you expect a certain interaction to look, chances are that they’ll use an unstyled generic design, which could stand out like a sore thumb. Sure, there are some coders (like me!) that will do our best to guess what you would have wanted, by why leave something so important to guesswork when it takes you just a few minutes to design it yourself?


Tip 04: Have a Script in Mind

Time is money, so if you design a website with a nice looking slider and you know exactly which script would be perfect for it, tell the developer before they start coding it from scratch! If you don’t have a particular script in mind, it’s probably worth your time to spend a couple minutes searching for whether or not one exists. Custom scripts can cost lots of time and money – and it’s a lot easier for you to create a design with a particular script in mind than it is to create a custom script from scratch to match your design.

Using pre-made scripts isn’t a bad thing! This might seem like advice meant to crush your creativity, but think of it this way: it can easily take 20x as much time to code something from scratch rather than using a pre-made piece of code. Pre-built scripts are usually easy to adapt and re-design, and there are thousands upon thousands of them available through a simple Google search. Envato even has it’s own marketplace for premium scripts if you can’t find a free one that works: CodeCanyon!


Tip 05: Get to Know the Technology You Are Designing For

Let’s imagine that you’re a designer on a major project. You spend weeks laboring over a design and finally get the approval of your client… only to find out a week later that the design is nearly impossible to code and that it’s going to cost 10x as much as the client had budgeted; All because you designed the entire site without an understanding for what is and isn’t possible with a certain technology (Flash, HTML, etc.).

One of the most important tips that I can give out is this: It’s vital that every web designer have some knowledge about the platform that they are designing for. This could be HTML, Flash, PHP, or even a device like a phone or tablet. How much you learn is up to you, but the basic understanding of how a platform works will save you a lot of heartache in the long run. Far too often I’m given a gorgeous design that isn’t practical (or affordable) to code because it hasn’t been designed with practicality in mind.

Far too often I’m given a gorgeous design that isn’t practical (or affordable) to code because it hasn’t been designed with practicality in mind.

I’m not suggesting that you limit your creativity (just about anything can be coded with enough time and energy); and I’m also not suggesting that you go out and become a coding guru (you’d put me out of a job!)… But having even a basic knowledge of the technology that you are designing for will help inform your designs with some basic rules of thumb that will make coding them easier and more affordable.

For instance: if you designed a site to be built as a static web page, it would make sense to learn a little bit about how HTML and CSS work. Having even just a basic understanding of how HTML and CSS relate to each other will be enough for you to make better decisions when you are designing. The more informed a designer is about the technology he/she is designing for, the better they will become at designing!

*Yes, HTML isn’t the only technology out there, so if you’re designing with Flash or another technology in mind, make that the focus of your research… you get it though, the architect should know how to swing a hammer, even if he never does it.

Bonus Tip : Speak Up!

You don’t need to provide a 20 page style guide for every website you design, but communicating principles that might not show up in comps can be really important to the success of any coding project. If your design has special requirements (ie: it needs to be meet certain accessibility standards, or it must be 100% compatible with IE5.1, etc.), make sure you let the coder know up front so we can plan ahead for it. Finding out major requirements AFTER the design is coded is a recipe for expensive revisions, which aren’t nearly as fun or lucrative for coders as you might imagine! Most of us would much rather move on to another exciting project rather than spend months making revisions with a frustrated client.


Conclusion

The last thing that I’ll mention is this: if you follow these tips, not only will you find that your designs become easier and more affordable to code, you’ll also probably notice that your work will improve as a result. Taking a few extra steps to ensure that you designs make sense in the practical world of web development can be the difference between a good website and an exceptional website. I hope you enjoyed this article!

Philo Hermans is Philo01 on Codecanyon
Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • Phil

    Even though i’ve used those techniques a lot before, it is quite a good article.

  • http://www.ianscheller.com/icb Ian Scheller

    Great article! Even though I code both to pixel and not – this is a good point most designers will often overlook. Its a good idea to help out the developer or whoever is going to receive your designs next by being specific. It helps in collaboration.

    • http://themeforest.net/user/epicera/portfolio?ref=epicera Brandon Jones

      Thanks Ian – Good points about collaboration – I think that’s really at the heart of this article… most designers worth their salt know a bit about coding and work with developers all the time; remembering that what we design ultimately needs to be translated to code by someone else is at the heart of an effective web design project.

  • Zwei

    This principles are a really big help for us who are new to this in shaping a good foundation.. thank you so much!

    ^ ^

  • http://www.southmakers.com Alvaro

    A must-read article for every web designer…

  • Phill

    I agree that the designer should take the time to learn about the driving technology. It is quite obvious when a designer is versed in print design and does not understand the concepts and principles of designing for the web. A lot of time is spent in the back and forth of this and it simply wastes money and stirs emotions.

    • http://envexlabs.com Matt Vickers

      This is so true.

      Most headaches are caused when a designer thinks something can be done, when is reality it can’t. Just hope they haven’t “promised” that feature to their client already.

      • http://armorik.com.ba rohnn

        I believe everything can be done.
        It is just a matter of time & budget !

      • Phill

        Yeah I agree with rohnn. Its not a matter of whether or not it can be done- it a matter of how efficiently it can get done.

        Anything is possible with the right approach, but most of the time the Front End Development gets short deadlines for the curve balls a poorly versed web designer tends to usually throw.

        The latest issue I ran into was that the site was not designed to be easily scalable. The setup of the navigation and Placement of certain elements, etc. It looked great at first, but when more content was added and second/third level navigation came into play the design get extremely overwhelmed.

        That would be like asking a print designer to fit a 30page magazine in 20 without losing a pixel or shrinking the text too much.

        • http://www.delucamarketing.ch NetHawk

          I think Matt is refering to things that can not be done within reasonable limits. Like a crazy CSS3 wizardry that has to run in IE6. Or a specific design of form elements that must look precisely so, also in Safari.

          Many times designer don’t know, that their design calls for a solution that is not very robust. They even would be willing to come up with a solution that causes the coder less headaches, if they would just KNOW about that.

          So I guess, that designer and coder have to interact and learn from each other to come up with the best possible solution within a given time and budget frame.

  • http://visual-blade.com Daquan Wright

    I enjoy doing my own code, wouldn’t dare ask someone else to complete my tiny projects, hehe. :)

    Though I am majoring in computer science, so I guess that is natural.

  • Andrew

    Very good article. I’ll address it to the guy who made design for my current project because he made pretty much hard template to code in without thinking of any of those things mentioned here.

  • byteheadx

    great article.
    Good tips and well organised information.
    Thx

  • http://www.hambrook.co.nz Rick Hambrook

    I used to go back to designers with a list of questions about their inconsistent margins and borders etc… I even had one designer trained to add an extra layer with text specifying each margin, font size, hex colour etc… Made him think about these things a little more which was worth a lot more than the actual information.

  • http://www.Photoshop-Tricks.com Graphic-Studio

    Very good explanation of following the rules of the road!

    I shall follow your concepts in the future!

  • Nikush

    Great article, thanks!

  • http://wpcanyon.com Boba

    Great article and i agree with it completely. I’m a developer and i have been in a position when i don’t have enough info on a project so i have to send over an email asking and then wait for response and that takes time i can’t afford to lose since i don’t charge hourly, i have specific prices that depend on some non-time related variables.

    And when i took chances and decided what he wanted by myself i got burned often and had to rewrite it.

  • http://avatostudios.com Alex Hughes

    Great article, worked as a developer on a few sites where simple things like this would of cut production time greatly.

    Absolutely loving the site since launch! Keep up the great work!

  • anon

    I design and code my own sites but it was good read, to help refresh my memory :D

  • http://www.joshuabriley.com Joshua Briley

    AMEN! All too often I get a .psd file with no consideration for behavior. I spend a lot of time guessing. Another issue I’m faced with is interpreting what an “internal” page would look like and how it would behave. And finally… the designer who wants every page to be “slightly” different… you know… the search field being 2px wider on page X or the primary content area having 6px on one page and 7px on all others. Ugghhh… ok, I’ll stop ranting now. Thanks for allowing me to vent. Great article.

  • http://www.markdijkstra.eu Mark Dijkstra

    Nothing new for me, but still a good article. I find the first point very important, a site/design must be in balans(same amount of space). I have see a lot of good sites but because they dont create balans in there sites it looks not that nice. Sometimes 5px more of less can make or break an site/design.

    Nice article.

  • http://www.blackbluebrown.com geoff brown

    great post. very informative, and straight forward.
    thanks!

  • Pingback: You are now listed on FAQPAL

  • http://charmingwp.com Ahmad

    Its just great article however some Tech are old

  • http://www.iamiivo.com Iivari Leinonen

    Great article. I also think that every web designer should read this. I can’t even remember how many times I have had to fight with several designers about how they can’t always expect to see the layout pixel perfect on screen. It’s really sad to see them not giving any effort to learn about how html, css and browsers work since their work is gonna end up on the screen anyway.

  • http://heathwaller.com/ Heath Waller

    Perfect timing! I was just about to start coding my new site. Now, thanks to your article, I will pull out the fine-tooth comb one more time. I will, ostensibly, measure twice, cut once.

    (I know I should be doing this all the time, but sometimes it is good to be reminded!).

    Thanks for the great article.

    • http://themeforest.net/user/epicera/portfolio?ref=epicera Brandon Jones

      measure twice, cut once

      How did we not find a way to include that line in this article?! Thanks for the comments Heath!

  • arnold

    Thanks for the tips, the pixel-perfect tip is the best.

  • http://www.hmwebsolutions.co.uk nathan

    Very helpful and interesting article. This will help me in the very near future as I plan on outsourcing the coding side of things.

    Cheers

  • http://www.hisubash.com Aneslin

    Thanks for the great tips,
    really useful for biginers like me.
    thanks

  • http://abstractizm.de Hakan Yilmaz

    6. Use Layercomposition in Photoshop

    Designers check and uncheck their Layers while showing their work. Espacialy when start searching for events or functions like mouseovers in big PSD files. Use Layercomps!

    http://yfrog.com/ncebenenkompositioneng

    abs

    • http://themeforest.net/user/epicera/portfolio?ref=epicera Brandon Jones

      Good addition Hakan – I totally agree!

    • http://twitter.com/zbysek Zbysek

      Nice function. I haven’t been using it and I’ll be from now on.

  • http://twitter.com/zbysek Zbysek

    What’s driving me crazy is when a designer did not name or group layers in psd files. There is nothing worst than 200 unnamed layers when you need to find one particular layer to turn it invisible for slicing.

    Coloring layers and groups is also helpful.

    • http://www.sarahkbraun.com Sarah

      Totally agree! It makes it so much more difficult to properly slice up and find your way around a document when you’re staring at a completely unorganized mess of layers and groups.

      The best designers I work with at my current job do a wonderful job of naming organizing their layers into logical groups – “header”, “nav”, “content”, “footer”, etc.” – and it shaves off so much time from the coding process!

  • Pingback: 5 Easy Ways to Prepare Your Web Designs for Coding | cssWOW:: CSS Gallery

  • chris

    i learned a lot on this article..thankss…

  • qahar

    most usefull article i ever read about web design, thanks!!

  • Pingback: 5 Easy Ways to Prepare Your Web Designs for Coding | professional website design

  • http://www.mrare.ca Bryan Maniotakis

    I haven’t used the note tool until now, thanks!

  • Pingback: Link Minggu Ini 241010 | DesainDigital

  • http://www.red-team-design.com Red

    Nice article and thanks for sharing.

    I mostly enjoyed reading the #2 and #4 points because I agree a designer should think about later coding when creating a template.

  • http://www.njwebdesign.co.za/ Nicole

    How about designers who tend to flatten layers and/or filters on layers. Umm, I kinda need to get the colour of the layer for the designs, silly!

    I am having a problem with a designer currently who is doing this, flattening filters, except it seems if it is a stroke or a shadow, which is really wierd.

  • ajay kumar

    sir , after designing….
    do u have any tutorial for coding..?

    • http://themeforest.net/user/epicera/portfolio?ref=epicera Brandon Jones

      Not here, but we have an entire website dedicated to coding over at Netutts!

  • Pingback: 5 Easy Ways to Prepare Your Web Designs for Coding | Tweak Designs

  • Pingback: 5 Easy Ways to Prepare Your Web Designs for Coding | System Green

  • http://digisavvy.com Digital Media and Marketing

    I dig this article because it’s especially relevant to what I’m doing right now. I spend a lot of time doing psd to wordpress conversions. Needless to say, I’ve had to work with each company’s design team that sends me psds to include as much basic detail as possible. It’s been something that I’ve been very, very strict with. I try to get as much info up front and after the project I do a quick debriefing to find out anything that I may need to include for projects going forward.

  • Pingback: 5 Easy Ways To Prepare Your Web Designs For Coding | whatanicepost

  • http://www.freedomstudios.co.za Graham

    Great article.
    The pointers and keys to a successful project.
    I keep forgetting about the note tool – wow I have been using Photoshop for several years and have still not used it.
    Will incorporate notes in my next design for sure.

  • http://14eleven.com Fyza

    This article and the comments did nothing but frustrate me (nobody’s fault here). I am a designer and I am extremely mindful of what is possible or not and I make sure to label my layers and groups properly, show how things should look selected, etc… Pretty much everything mentioned here.

    But I somehow ended up with a client that has a developer that has NO IDEA what he is doing. He didn’t make an effort to do anything as I specified. No selected/active states so people know what they’ve clicked on, no shadows where there should be, things are misaligned, it drives me crazy!

    What should I do in that situation? He’s not someone I chose or have worked with before and the client wants to stick with, him meaning all the money they spent on my design is going down the drain. Sometimes it seemed that I knew more than him and had to explain things to him when it should be the other way around.

    Sorry for that rant, I am just really flustered. Every dev I have worked with in the past was competent and executed my work with ease. This guy just seems to be lazy and out of touch with current technologies.

  • http://www.swimminghippo.co.uk SEO Midlands

    Another post of great tips!

    Getting the margins right in Photoshop first is the point that annoys me. If they are all different it makes the coding job a little bit trickier, and you don’t have all the correct measurements (px x px) for the design.