How to Convert Mini Portfolio from PSD to HTML5/CSS3 website

How to Convert Mini Portfolio from PSD to HTML5/CSS3 website
  • Share
  • Share

Today I want to share with you a small tutorial that depicts basic steps of converting simple portfolio layout into working HTML5/CSS3 landing page.

You can grab free

How to Convert Mini Portfolio from PSD to HTML5/CSS3 website

What we need:

  • Responsive CSS Grid System, in our case I will be using Skeleton Boilerplate;
  • Adaptive image slider FlexSlider kindly provided by Woothemes;
  • Images for slider section and testimonial as well as quote icon;
  • Special font – I have used Book Antique that is free of charge.

Of course, you can prepare whatever images, icons and font you like.

1. A few words about Skeleton Boilerplate.

I have choosen this framework first of all, because it’s responsive and easy to use. You can easily divide layout on columns only using right classes. Nevertheless, you can choose whatever boilerplate you like. There are so many of them for every taste.

After you download base framework and unzipped it. You will find folder with necessery directories such as images and stylesheets. Now you will need 2 more folders: fonts (there you can keep you seleted font) and js for slider javascript files.

After creating necessary folders and adding all images in /image folder, Book Antique font – BKANT.TTF in /fonts folder, you will have 4 folders: images, stylesheets, fonts, and js.

folders

Then open stylesheet folder and create new file styles.css, there you will describe your own styles.

Open index.html and delete everything between body tags.

Now remember in order to make your structure organized you should put everything into div with container class.

2. Let’s analyze our page. As you can see on the picture below, it can be easily divided into 4 regular sections:

  • Header which consists of navigation links and Contact Info;
  • Slider showcases your recent works;
  • Testimonial section includes author image, quote icon, text and signature;
  • Standard Footer with copyright data and social media links.

Let's analyze our page

3. Header Section.

Header Section

On the left side I have placed navigation system that will be implemented by ordinary list displayed inline.

On the right side Contact Info is simple paragraph with 2 lines.

Also, as you can see, I have border that consists of 2 lines: grey and white. In order to realize it I create block with id lines where I describe those 2 lines by means of border style.

Open index.html and firstly, delete all in head tag and add these lines

<br />
<title>Mini portfolio HTML layout based on Skeleton and made alive by land-of-web.com</title><br />
	<meta charset="utf-8"><br />
	<meta name="description" content="Mini portfolio HTML layout based on Skeleton CSS Grid and made alive by land-of-web.com"><br />
	<meta name="author" content="land-of-web.com"><br />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <!-- Mobile Specific Metas --><br />
	<link rel="stylesheet" href="stylesheets/base.css"><br />
	<link rel="stylesheet" href="stylesheets/skeleton.css"><br />
	<link rel="stylesheet" href="stylesheets/layout.css"><br />
	<link rel="stylesheet" href="stylesheets/styles.css"><br />
	<!--[if lt IE 9]><br />
		<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><br />
	<![endif]--><br />
	<!-- Favicons --><br />
	<link rel="shortcut icon" href="images/favicon.ico"><br />
	<link rel="apple-touch-icon" href="images/apple-touch-icon.png"><br />
	<link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png"><br />
	<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png"><br />

Then start to work with body section.

<br />
<div class="container lines"></div> <!-- 2 lines : grey and white on the top--><br />
<div class="container header"><br />
    <!-- Navigation --><<br />
	  <nav><br />
	   <ul><br />
		<li><a class="active" href="#">Home</a> /</li><br />
		<li><a href="#">About</a> /</li><br />
		<li><a href="#">Work</a> /</li><br />
		<li><a href="#">Blog</a> /</li><br />
		<li><a href="#">Contact</a></li><br />
	   </ul><br />
      </nav><br />
     <!-- Contact Data--><br />
	 <div class="contact_block"><br />
	  <p>Call Me:&nbsp&nbsp&nbsp 0123456789 <br />skypeID</p><br />
	 </div><br />
    </div><br />
<div class="container lines"></div> <!-- 2 lines : grey and white on the bottom--><br />

Then open styles.css file and add basic styles (including defualt font-face, body, link and paragraph description) and, of course, description of simple unordered list

<br />
/* #Basic Styles ================================================== */<br />
@font-face{<br />
font-family: 'Book Antique';<br />
src: url('../fonts/BKANT.ttf') format('truetype');<br />
}<br />
<br />
* {<br />
-moz-box-sizing: border-box;<br />
-webkit-box-sizing: border-box;<br />
box-sizing: border-box;	}<br />
<br />
body{<br />
font-family: Helvetica, Arial, Sans-serif;<br />
background: #f6f5f5; /* url(../images/body-bg.jpg)*/<br />
}<br />
<br />
a, a:visited {<br />
color: #111111;<br />
text-decoration: none;<br />
outline: 0;<br />
}<br />
<br />
a:hover, a:focus {<br />
color:#494747;<br />
}<br />
<br />
p{<<br />
font-size: 14px;<br />
color: #625f5f;<br />
}<br />
<br />
/* HEADER ================================================== */<br />
.header{<br />
height:55px;<br />
}<br />
/* LINES ================================================== */<br />
.lines{<br />
border-top: 1px solid #cdc9c9;<br />
border-bottom: 1px solid #fff;<br />
margin-top:20px;<br />
}<br />
<br />
.lines2{<br />
display:block;<br />
height:1px;<br />
border-top: 1px solid #cdc9c9;<br />
border-bottom: 1px solid #fff;<br />
padding-bottom:0px;<br />
}<br />
/* NAVIGATION ================================================== */<br />
nav{<br />
float: left;<br />
padding-top:20px;<br />
}<br />
<br />
nav ul{<br />
float: left;<br />
margin-top: 1px;<br />
}<br />
<br />
nav ul li{<br />
float: left;<br />
margin-left: 20px;<br />
color: #67b256;<br />
}<br />
<br />
nav ul li a{<br />
display: inline-block;<br />
padding-right: 20px;<br />
text-decoration: none;<br />
font-family: 'Book Antique', serif;<br />
font-size: 16px;<br />
color: #625f5f;<br />
}<br />
<br />
nav ul li:last-child a{<br />
padding: 0;<br />
}<br />
<br />
nav ul li a.active{<br />
color:#353434;<br />
}<br />
<br />
nav ul li a:hover{<br />
color:#353434;<br />
}<br />
<br />
/* CONTACT BLOCK ================================================== */<br />
.contact_block{<br />
display: block;<br />
padding-top:5px;<br />
width: 180px;<br />
height: 32px;<br />
float: right;<br />
text-shadow: none;<br />
}<br />
<br />
.contact_block p {<br />
text-align:right;<br />
font-weight:bold;<br />
}<br />

Header section itself has gained only height size.

I have created 2 individual line blocks. First one for header that has got 20px margin in order not to stick to the top of the browser window. And the second block for other decorations.

Contact block has its own width and height with text align to right.

Navigation is a simple unordered horisontal list.

4. Slider section.

Put your earlier prepared images in /image folder. Then put these lines in a head section of index.html.

<br />
<!-- FlexSlider - Slideshow --><br />
	<link rel="stylesheet" href="stylesheets/flexslider.css" type="text/css"><br />
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script><br />
    <script src="js/jquery.flexslider.js"></script><br />
	<script type="text/javascript" charset="utf-8"><br />
     $(window).load(function() {<br />
       $('.flexslider').flexslider({<br />
        animation: "slide",<br />
		controlNav: true,<br />
        directionNav: true,<br />
        prevText: "Previous",<br />
        nextText: "Next"<br />
      });<br />
     });<br />
    </script><br />
 

Then let’s add media content (images) into slides creating index.html

<<br />
<!-- Slideshow --><br />
    <div class="container slider"><br />
	  <div class="flexslider"><br />
       <ul class="slides"><br />
        <li><a href="http://www.land-of-web.com/freebies/psd/freebie-clean-minimalistic-portfolio-layout-psd-template.html"><img src="images/slide1.jpg" /></a></li><br />
        <li><a href="http://www.land-of-web.com/freebies/psd/freebie-iphone5-app-landing-page-psd-template.html"><img src="images/slide2.jpg" /></a></li><br />
        <li><a href="http://www.land-of-web.com/freebies/icons/freebie-graduation-hats-social-icons.html"><img src="images/slide3.jpg" /></a></li><br />
       </ul><br />
      </div><br />
	</div><br />
 

We won’t change anything in slider style, we just simply add flexslider.css file in stylesheet folder and add only few lines to give slider a bit of air.

<br />
/* SLIDER ================================================== */<br />
.slider{<br />
margin-top:10px;<br />
margin-bottom:10px;<br />
}<br />

5. Testimonial section.

Testimonial section

As you can see there we will need only 2 images: author image with special border style and simple quote icon.

Icon with text that is enclosed in paragraph tag and signature in cite tag will be in blockquote tag.

index.html markup

<br />
<!-- Testimonial --><br />
    <div class="container testimonial"><br />
      <img src="images/cat.jpg" alt=""/><br />
		<blockquote><br />
			<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec accumsan sem ac massa interdum lobortis. Nulla fermentum consequat arcu, quis scelerisque nibh feugiat vitae</p><br />
			<cite><strong>Lorem Ipsum, 2012</strong></cite><br />
		</blockquote><br />
		</div><br />

styles.css

<br />
/* TESTIMONIAL ================================================== */<br />
.testimonial{<br />
margin: 20px auto;<br />
padding: 0 40px;<br />
}<br />
<br />
.testimonial img{<br />
float: left;<br />
margin-right: 35px;<br />
border: 5px solid #fff;<br />
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);<br />
}<br />
<br />
blockquote{<br />
background: url(../images/quote.png) no-repeat;<br />
overflow: hidden;<br />
border: none;<br />
}<br />
<br />
blockquote p{<br />
font-size: 14px;<br />
padding-left: 40px;<br />
font-style: normal;<br />
}<br />
<br />
blockquote a{<br />
display: block;<br />
text-align: right;<<br />
font-size: 12px;<br />
font-style: italic;<br />
}<br />
<br />
cite{<br />
text-align: right;<br />
font-style: normal;<br />
color: #23353e;<br />
}<br />

6. Finish with Footer Section.

Footer Section

We will divide our section into 2 separate parts. First one is simple paragraph with copyright info. And second one is another ordinary list whose elements are displayed inline.

In order to set necessery width and position, I use predefined classes of Skeleton Boilerplate.

For copyrights I will use class called “six columns left” giving it 268 px width

and for social media “ten columns left” giving the rest space.

index.html

<br />
<div class="container lines2"></div><br />
<br />
<!-- Copyrights and social icons --><br />
	<footer class="container footer"><br />
		 <div class="six columns left"><br />
		<p>Copyright 2012 <a href="http://www.land-of-web.com">land-of-web</a> | Design by <a href="www.twitter.com/nataly_birch">Nataly Birch</a></p><br />
        </div><br />
		<div class="ten columns left"><br />
		<ul class="social"><br />
        <li><a href="http://www.facebook.com//pages/Landofweb/203453913014366?sk=wall" title="Facebook">facebook</a> /</li><br />
        <li><a href="https://twitter.com/nataly_birch" title="Twitter">twitter</a> /</li><br />
        <li><a href="#" title="Google+">google+</a> /</li><br />
		<li><a href="#" title="Pinterest">pinterest</a> /</li><br />
		<li><a href="#" title="Dribbble">dribbble</a> /</li><br />
		<li><a href="#" title="Behnace">behance</a> /</li><br />
		<li><a href="http://feeds.feedburner.com/land-of-web/YPDH" title="Rss">rss</a> /</li><br />
       </ul><br />
	   </div><br />
</footer><br />

styles.css

<br />
/* FOOTER ================================================== */<br />
.footer p{<br />
font-family: 'Book Antique';<br />
font-size: 12px;<br />
color: #625f5f;<br />
}<br />
<br />
 ul.social {<br />
float: left;<br />
<br />
}<br />
<br />
ul.social li{<br />
float: left;<br />
margin-left: 10px;<br />
color: #67b256;<br />
}<br />
<br />
ul.social li a{<br />
display: inline-block;<br />
padding-right: 5px;<br />
text-decoration: none;<br />
font-family: 'Book Antique', serif;<br />
font-size: 14px;<br />
color: #625f5f;<br />
}<br />

7. Working on Media Queries Section

<br />
/* Media Queries ================================================== */<br />
@media only screen and (max-width: 767px) {<br />
nav{<br />
float: left;<br />
margin-top: 15px;<br />
}<br />
<br />
nav ul li:first-child{<br />
margin-left: 0;<br />
}<br />
<br />
ul.social {<br />
float: left;<br />
margin-top: 15px;<br />
}<br />
<br />
ul.social li:first-child{<br />
margin-left: 0;<br />
}<br />
.testimonial img{<br />
display: none;<br />
}<br />
<br />
@media only screen and (max-width: 479px) {<br />
nav ul li:last-child{<br />
margin-left: 0;<br />
}}<br />

That’s all. If you have any suggestions please share it with us via comments.

About the author

Co-founder of land-of-web.

Leave a Comment