Get $500+ of the best After Effects files, video templates and music for only $20!
From PSD to XHTML
videos

How to Convert a PSD to XHTML

I continue to be amazed by how well Collis’s “Build a Sleek Portfolio Site From Scratch” tutorial continues to perform. It’s been months, yet it still posts strong numbers every week. Considering that fact, I decided to create a screencast that shows you exactly how to convert a PSD into perfect XHTML/CSS.

Part 1: Slicing the PSD and Creating the XHTML

Part 2: CSS

I won’t lie to you. This video is a bit boring. It just isn’t fun to watch someone enter margin values for thirty minutes. :) But it’s essential.

Part 3: Implementing a Bit of Javascript

Part 4: Kicking IE6′s Butt

Could we really call ourselves web developers if we didn’t have to fight with IE6? And is it a coincidence that “6″ is also the number associated with the devil? Who knows.

Mostly, the site looks just fine in IE6, but we should change a few quirks. Create a new stylesheet and call it “ie6.css”. Place it in your CSS folder. Then paste in the following.

#container #mainContent #tier2
{
	margin-bottom: 273px !important;
}

#tier3 #news
{
	position: relative;
	left: .56em;
}

#header
{
height: 158px;
}

#header #login
{
	top: 1em;
	right: 1.5em;
}

There’s nothing that we really need to go over. Mostly, I’m adjusting the positioning of a few elements.

The last step is to reference our new stylesheet in the head tag of our document.

    <!--[if lt IE 7]>
        <link rel="stylesheet" type="text/css" href="css/ie6.css" />
    <![endif]-->

The PSD

The PSD

The Website: 100% XHTML and CSS

The PSD

I hope this helped you. Everyone has their own way of doing things; So I’d be interested to hear your thoughts. This tutorial was a huge undertaking. I’d appreciate a Digg if you found it to be beneficial.

  • Subscribe to the NETTUTS RSS Feed for more daily web development tuts and articles.


Add Comment

Discussion 397 Comments

Comment Page 7 of 8 1 ... 5 6 7 8
  1. Tony says:

    NIce tutorial, but if you sitll are not able to do iit check out this site called http://www.rapidconvert.com.

  2. Luu says:

    Great! Thanks!

  3. Joe says:

    Great tut, but for the css I added:

    #header
    {
    background: url(images/header.gif) no-repeat;
    overflow: hidden;
    }

    The image/banner/header doesn’t show. I know I have the correct div id in my html as well.

    Help anyone? It does it with ALL of my images.

    • nevvermind says:

      You have to set the height and width for that specific element to show up, be it div, img or w\e.
      So, if the header .gif has 600x200px, your css for that div should look like this:

      #header
      {
      background: url(images/header.gif) no-repeat;
      overflow: hidden;
      width: 600px;
      height: 200px;
      }

  4. kc says:

    Amazing tut!!
    I learnt more about css in these tuts than i did schooling for a year.. studying multimedia design!

    • grafikat says:

      same here.
      I have learn more from copying and pasting jquery code in 2 weeks and this video explanation from scratch has made me understand and put all the puzzles together clearly in my head. this 2 hours have been the most awarding information compared to one year of schooling :) Thanks Jeffrey!

  5. Great tutorial for beginners.

    cheers.

  6. Tarr says:

    Hey Joe,

    I had the same problem as you, my solution was that the syntax is wrong. It’s suppose to be.
    background-image: url(../images/htmlbg.jpg)

    Hope it helps.

    My problem is, that I can’t get the script to execute at all. Any help?

  7. Mariam says:

    This is the best tutorial I came across on web, thanks for this.

  8. Yourchan says:

    I love how their is 318 comments and yet not 1 digg…good work guys.

    • Mr. Goodkat says:

      Might have something to do with having to be a member on digg.com to digg it.

    • Shane says:

      I digged it :) I didn’t even have a real use for the vids cuz i use a mac so that microsoft studio program isn’t something i have access to unless i virtualize it in windows but that would make my life a living hell sharing files…so i’m gonna just find a new tutorial for a mac user…appreciate the indepth vid tho…it was nice to learn some stuff

  9. Cryoffalcon says:

    This is really a helpful topic, and its more helpful as videos are there, thanks for providing all this.
    Cheers.

  10. Susheel says:

    Thanks ! ! a lot….
    It’s a Grate Tutorial

  11. nevvermind says:

    You don’t need to create all the image slices then delete the ones you don’t need.
    PSP does that for you.

    1. “Save for Web & Devices”
    2. Select the slices you want (multiple selection with CTRL key)
    3. “Save”
    4. The last (forth) option – “Slices” – choose: “Selected slices”

    It will only save the slices you’ve selected. Pretty straightforward.

  12. wedding says:

    This is really a helpful topic, and its more helpful as videos are there, thanks for providing all this.

  13. wedding says:

    It’s very good!

  14. flizjee says:

    Awesome tutorial,i am looking this tutorial ,advantage for newbie like me,thanks

  15. Rz says:

    Why to do so much work in photoshop when u hav to build that site using hand coded css/html why not build it from the start using html/css.???

  16. dan says:

    Awesome tutorial. I wish I could grasp the design aspect but I lack the creativity to do it. Instead I am in the process of coding this template to work with WordPress. I’ll let you know how it goes. (side note: I have no intention of using it on a site. Just teaching myself to put together themes on WordPress)

  17. Great Resource! Anyone looking for Front-end web development help? We can help you any psd to html/css and psd to wordpress jobs :)

  18. Sam says:

    Very nice tutorial!!!!!!!!!!!!!!

  19. Psdtoxhtml says:

    Great tutorial for beginners.

    cheers.

  20. ayoub says:

    Thanks so much !
    This is exactly what I needed !

  21. Mike says:

    Hey, this really helped me! THANKS!

  22. tobasy says:

    Many Thanks,
    you really make it easier, and i learned alot in short time….thanks again :)

  23. tobasy says:

    Many thanks,
    you really make it easier, and learnd alot in short time….thanks again :)

  24. Joby says:

    Very Nice Tutorial.

  25. Danny says:

    Thanks so much for such a detailed tutorial.. I’ve been designing now for 10+ years this is the first full tutorial from start to finish I’ve ever watched. This is a great tutorial..

  26. KK says:

    Its great post. Really loved it …digging it right now

  27. Kinda says:

    Thank you so much for this Tutorial, I learned a lot from it. It was Exactly what I needed!!!

    It all worked for me, except sadly the innerfade effect using the Java script :( I’ll try and work on it and see what I can do.

    Thanks Once more!!

  28. I learned thanks to.. Great job!

  29. Sonachalam says:

    Hi Jeffrey,
    This is great. Thanks so much for such a detailed tutorial. Wow! wonderful. Pls contact.

  30. Steve says:

    Superb tutorial. Clearly explained and some great tips. Many thanks.

  31. gaurav says:

    Hi Jeffery Way,

    Its really a great tutorial for me. I repeated almost 50 times and finally able to do css myself. check out my creation, its done because of your tutorial. http://www.vparshuram.com

    Now, i have few troubles…
    1st the 3 boxes you created for example who are we and all… their height gets massed up, if we zoom in our browser. Is there any good way to keep them streat.

    2nd -moz and -webkit doesnt work for IE 8, any solution for that?

    I think this is it. I appreciate if you or anyone can answer this two. Nice tutorial great job and really helpful.

    Thanks for uploading and being so discriptive.

    - SHAH

  32. Ian says:

    Great Tutorial!!! Thank you for the great info. I didn’t mind that it was a bit slow, it was perfect for beginers. thanks for not skipping any steps and making it very clear for us who are newbies.

    One thing though, why go through the whole design in photoshop? Wouldn’t it be easier to just design it with pencil and paper, then pick your colors in photoshop or any program, then create it in html/css?

    Either way, Thanks again!!!

  33. pooja gupta says:

    nice

  34. Mike Ruffle says:

    Absolutely superb. I learnt a lot while watching and will implement some of that into my own code. Pace of the tut was very good and your explanation of the why’s and wherefore’s was appreciated.

  35. yagiz says:

    Great Tutorial..

    Learned a lot, thanks..

  36. “XHTML Champs” is a business unit of Acedezines, a well-established web designing company with clear business orientation and strong creatives. Ace Dezines has over fifty satisfied clients across the globe from different verticals such as animation, software, pharma, e-learning, construction and nutraceutical companies.

    For More Details Visits to our site: http://www.xhtmlchamps.com

  37. Aknur says:

    Hello…

    Where can I download this PSD layout?
    because I can not teach a lesson without psd

    Thank you.

  38. klaudio says:

    This is great tutorial! Very helpful!
    I was wondering how to design a website in Photoshop and then convert it in HTML or XHTML and this explains it all!
    Thank for doing this. ;)

  39. This is really an amazing tutorial, well explained and easy to follow. Thank you very much for the videos.

  40. zakutnya says:

    Great step-by-step explanation! Didn’t see anything new, but still was glad to watch it up to the end.

    Go on, i’ll watch with pleasure)

  41. KFX says:

    Hey I really appreciate all the step-by-step procedures, it really helps out new people to css etc. Thanks, great tutorial!

  42. Very good videos thanks , Great job!

  43. Web Design says:

    This was helpful! Thank you!

  44. Charles says:

    Extremely superb. Thanks thanks thanks a lot!!!!!!!!!!!!!!!!!!

  45. Charles says:

    Can you show me an example for adding comments website? I’l be grateful for you! please excuse for my English, I’m a Sri Lankan!

  46. Sharif says:

    Thanks for the tutorial. It helps me ALOT!

  47. Sameer says:

    Awesome information Thanks!

  48. Kamrul Hasan says:

    Thanks to Jeffry! really nice tutorial for myself……

  49. tokyee says:

    wanna join u ,

Comment Page 7 of 8 1 ... 5 6 7 8

Add a Comment

To add a code snippet to your comment, please wrap your code like so: <pre name="code" class="html">YOUR CODE</pre>. You can replace the class name with "js," "css," "sql," or "php." If there are any "<" or ">" within your code, please search and replace them with: &lt; and &gt; respectively.