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.


Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • arn75

    nice one :

  • Pingback: نت نوشت » 13 مقاله براي تبديل PSD به XHTML

  • Justin

    Thank you soooo much for this tutorial. I have been playing around with Photoshop, Dreamweaver, etc. for some time now and this is by far the most helpful source for integrating the two in order to produce a VALID a site. Thanks a lot!

  • Pingback: 43个PSD转xHTML+CSS网页布局及导航教程 | 绿萝花房

  • Theodor

    umm I got a problem,JavaScript won’t work….I did exactly as you no error…no type nothing…it simply doesn’t appear,just first image,any help please?

  • http://www.convert2xhtml.com Leena

    Cool way to do this converting from PSD to XHTML. I will forward this link to my team to check out and see if we can fasten our work.

  • Katrina

    I can’t believe I’m just now watching this! How did this tut slip past me? This is REALLY great and very useful to watch. The visual side and not just the textual step by step helps a LOT. Thanks Jeff!

  • pratheepa

    Excellent

  • Pingback: 20+ Photoshop Tutorials PSD to HTML/CSS, 35+ Online Services | tripwire magazine

  • http://lostpinedesign.com/ Dave Bonds

    Awesome! I really needed this tutorial!

  • http://denraphiel.com raphiel

    Yummy! love it! two thumb ups! :)

  • http://www.loto.web.tr loto

    love it man! Thanks.

  • Pingback: Our First Anniversary! | Tea Break

  • http://www.joyologo.com/ joyologo design shop 2.0

    Great screencast, thanks for the helpful tutorials.. all the best..

  • http://xhtmlcandy.com/ XHTML Candy

    Thanks for this detailed screencast . Post more articles like these.

  • http://kakasab.com/blog kakasab

    awsome tutorial dear, keep posting more about PSD for CSS

  • Pingback: 43个PSD转XHTML, CSS创建布局及导航辅导教程 | 互联网的那点事...

  • Reece

    Is there a free trial for MicroSoft Visual?

  • Lucas

    Seems like a great tutorial, but for a tactile learner like me, I wish you would give us .PSD’s to follow along… your “Slice and Dice that PSD” tut is also without this. I watch them anyway, and it all seems great, informative, and interesting, but in one ear out the other, no way to retain the info… Are there others out there like me who need hands on stuff to learn and retain new skills?

  • Pingback: PSD to HTML Slicing Tutorials - Hidden Pixels

  • http://www.crea8iveart.com Waheed Akhtar

    is this valid css ? i don’t think so.
    do -moz and -webkit work in IE 6 ?? i don’t think so.

    • Jason

      umm, this is valid waheed. so hush

  • http://usman.coislamscience.com Muhammad Usman Arshad

    thanks for share…

  • seens

    Jeff,

    Correct if i am wrong,

    ————————————

    ————————————

    i guess it should be,

    your tuts are really great man.

    good work

    SGJ

  • nic

    great work jeff!

  • Rudi

    Very well done. Thank you so much.

  • Debbie

    Great tutorial. Thanks!

  • SprockBoy

    Woow Thank you so much!!.. I learned a lot!. I was checking a lot of tutorials to convert psd to xhtml but this is the Best!. Greetings from Venezuela!

  • Stefan

    Very nice tutorial, you can typ and code so fast :D

    Thanks for sharing this man!!

  • Sowdri

    Thanks so much for this tutorial! I’m just a newbie and it helped a lot!
    It was just like downloading webdevelopment directly into my brain!!

    Amazing!

  • d1ve2blu3

    great article,,

    i’ve looking for thes,

    thank you,,

  • Pingback: Essential Web Designers Guide on PSD to HTML/CSS | tripwire magazine

  • Ismail

    Hi,
    very good tutorial! Thanks,

    but if possible can i have the source files “the PSD file”?
    thanks :D

  • http://dsgn.pw-software.com Nokadota

    I found this incredibly helpful and boring at the same time, lol. The fundamentals usually are. ;)

    Thank you for your time on this Jeff!

  • Beth

    This tutorial was amazing! It answers almost every question I had about CSS!

  • http://dynamic-soft.com Emanuel

    Thanks a lot for this helpful tutorial! I want to become a excellent webdesigner and to achieve this target I need to learn from experienced webdesigners. Thanks again!

    Regards,
    Emanuel

  • almulaiki

    please sir,
    where can I get the psd mockup?

  • Pingback: Web否? » Blog Archive » 43个PSD转XHTML, CSS创建布局及导航辅导教程

  • Pingback: A 'front-end framework' for designers? - Page 2 - WordPress Tavern Forum

  • http://www.live8easy.com jason

    can you tell me which plugin “edit css” in the Firefox,thanks~

  • Pingback: 10 awesome PSD to XHTML tutorials : Webby Tutos

  • http://www.htmlsplash.com Jonathan

    This is truly a great tutorial, So much better than the default “save psd as webpage” feature.

    I use htmlsplash for my conversions though whenever im lazy. lol

  • Benjamin

    Your tutorial is awesome, but I’d like to know about those two “JQuery”?
    When i save my document in Photoshop CS as PSD format and then save those images that i’ve put on my PSD file on a folder, exactly like what u did.
    now my question is : when i want to start to build my web page on “MS visual studio 2008″ i can not see those JQuery files? how should i do it?
    thanks alot

  • Ricky

    Would have been nice to share the psd, html, css etc for newbies to actually tried it after viewing this tutorial… Nice job

  • Pietu

    HI,
    Great tutorial!! Just one question about going forward on this kind project, how to add some new sites to those links on main page? Do I need to you frames or what? Thanks

  • http://www.designxhtml.com Design xhtml

    very helpful tutorial Thanks!

  • http://www.imtiaz1975.com Imtiaz Ahmed Qazi

    Awesome Job Buddy!
    Tell me where can I get more tutorial like this?

    Actually I am a newbie in coding world, can anyone help me! You jeffy? Please
    Thanks
    Qazi

  • Chris

    There are a lot of people from foreign countries looking at your screencasts and are not so perfect in English.
    So it would be a great help, if you speak more clearly and slower.
    Thanks.

  • Pingback: 10 Excellent PSD to XHTML tutorials | Design-Tut+

  • Daniel Castañeda

    Hi everybody, i’m thankful to have found this tutorial. The hour watching worth it.
    Now I wanna put my hands on work, can you send me the psd source please?
    I think we could add english subtitles to the video, it could help to understand the video to us, the non-english people. I’d like to help to do the job.

  • guest

    that was GREAT! well done.. and it was definitely not boring. thank you!