Professional Documents
Culture Documents
Tutorial Details
View post on Tuts+ BetaTuts+ Beta is an optimized, mobile-friendly and easy-to-read version of the Tuts+
network.
1 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
A couple weeks ago, we learned how to create a comic book theme web design over at our sister-site,
Webdesigntuts+. Today, well tackle the second part: its time to slice the design and turn it into a functional
HTML layout, ready to be ported to any CMS. Lets get started!
Before We Begin
You can get your very own PSD by following the step by step process at Webdesigntuts+ or just download it
here.
Since this isnt a beginner level tutorial, I will skip some basic explanations a working knowledge of
HTML and CSS is expected as well as a bit of knowledge about slicing images on Photoshop.
2 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
Lets start by creating the work folder; since this tutorial doesnt require the use of a server side language, it
can be anywhere on your system. Create a file named index.html, and three initial folders:
/images
/js
/style
Add the basic containers of the page to index.html. Im wrapping everything with a div called page. Inside that
div, add three more with IDs of header, content and footer respectively.
In the style folder, create a new file called default.css and add a reset to remove all the default styles. Im
using Eric Meyers but feel free to start with your favorite.
@charset "utf-8";
/* CSS Document */
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
3 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
Testing the code in Firefox, you should see something like this:
We wrap all the content with a 960px wide container, and then set the heights to the inner divs. To get the
exact height of each div you can use the Photoshop ruler tool.
4 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
We will slice the background images of the entire page and the footer section now.
In Photoshop, open Comicastic.psd and hide everything but the Header BG and Footer BG folders. Using the
slice tool, draw a big slice from the top-left until 575px below the top border. Next, draw another slice from
the guide delimiting the footer background (take a look at the image below). Of course, you can use the
guides to get an accurate result.
Using the slice selection Tool, select the two recently created slices and name each one with their
respective names bg-body and bg-footer. Then double click on all the auto-slices, and change the slice
type to No Image.
Next, go to File > Save for Web and Devices. Select the two slices you want to save (Hold the shift key to select
more than one), set the file type to JPG and set the Quality to 70 and click on Save. Browse for your
working directory and chose the root file (this dialog will automatically save your files inside the /images
folder).
5 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
6 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
Now that you have the background images, lets add the CSS for all the containers.
We will set a test height for the divs except the header (which is 180px height actually) and add some
temporary background colors for testing purposes.
/*Common*/
body{
background-color:#000;
background-image:url(../images/bg-body.jpg);
background-position:center top;
background-repeat:no-repeat;
}
/*Containers*/
#page{
margin:0px auto;
width:960px;
}
#header{
width:960px;
height:180px;
float:left;
background-color:#666;
}
#content{
width:960px;
height:400px;/* Temporal */
float:left;
background-color:#FCC;
}
#footer{
width:960px;
height:250px;/* Temporal */
float:left;
background-image:url(../images/bg-footer.jpg);
background-position:top center;
background-repeat:no-repeat;
}
Testing in a browser, you should have something like the image below.
7 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
Background Images
Now that you know how to slice the image, lets do the same with all the header and content background (or
foreground) images. For the header images, create a copy of the "comicastic.psd" document and hide
everything but the Logo folder and the Search background related layers (plus Im adding the search button
in this view after moving it a few pixels right). Now, draw the slices around the visible segments, and name
them logo, bg-search and search-button, respectively. Save them as PNGs with transparent backgrounds.
Show only the Background folder inside Top Banner, show the Page Curl folder and the Page Bg layer under Page
Content and show the Header Bg folder including the overall black background. Then, with these layers visible,
draw two slices: one for the banners background named bg-banner and another small one for the page curl
named content-page-curl. Then save them both of them as JPEGs.
8 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
Add a new div named logo inside the "header" and another div named top-banner inside content to our HTML
file.
<div id="header">
<div id="logo">
<a href="#"><img src="images/logo.png" width="340" height="135" alt="Comicastic" /></a>
</div>
</div>
<div id="content">
<div id="top_banner">Top Banner</div>
</div>
#logo{
padding-top:32px;
padding-left:70px;
}
[...]
9 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
#top_banner{
float:left;
width:960px;
height:250px;
background-image:url(../images/bg-banner.jpg);
background-position:center top;
background-repeat:no-repeat;
}
The hardest work with this div will be the positioning. Well make it float right, and play with the padding to
fit it in its proper place. Add the following CSS:
#main_navigation{
float:right;
}
#main_navigation li{
display:inline;
}
#main_navigation li a{
display:block;
float:left;
}
#main_navigation li a:hover{
}
10 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
First, download the CSS font packages "Komika Title" and "Komika Text" and put them in a new folder,
named /fonts. Each kit has a bunch of font files and a .CSS file that we will import to our default.css
document, as follows:
/*Font Face Kits*/
@import url("../fonts/komika-text/stylesheet.css") screen;
@import url("../fonts/komika-title/stylesheet.css") screen;
Now that the fonts are imported, we can use them anywhere on our site. Each set has a number of variants
to choose from; you can use the ones according to the graphic design. For starters, we will set all the body
text with 'KomikaTextTightRegular' as follows:
body{
background-color:#000;
background-image:url(../images/bg-body.jpg);
background-position:center top;
background-repeat:no-repeat;
11 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
In our CSS file, lets add the styles for the navigation bar, to achieve the desired hover effect. We will add the
background to the hover action and create a similar style for the a.selected instance. Regarding the
typography, per the graphic, we will use "KomikaTextItalic" and add a nice text shadow style to make it look
better.
#main_navigation{
float:right;
margin-top:-18px;
margin-right:20px;
}
#main_navigation li{
display:inline;
12 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
width:120px;
}
#main_navigation li a{
display:block;
float:left;
padding-top:7px;
padding-bottom:8px;
padding-left:20px;
padding-right:20px;
margin-left:5px;
color:#FFF;
font-family:'KomikaTextItalic', Arial, Helvetica, sans-serif;
font-size:18px;
text-decoration:none;
-webkit-border-top-right-radius: 3px;
-khtml-border-radius-topright: 3px;
-moz-border-radius-topright: 3px;
border-top-right-radius: 3px;
}
#main_navigation li a:hover{
background-image:url(../images/bg-main-navigation.png);
background-position:left;
background-repeat:no-repeat;
}
#main_navigation li a.selected{
background-image:url(../images/bg-main-navigation.png);
background-position:left;
background-repeat:no-repeat;
}
<div id="header-content">
13 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
Top Right
</div>
#header-content{
background-color:#036;
float:right;
width:440px;
height:105px;
}
<div id="search">
<form>
<input type="text" class="search_input" value="Looking for something?"/>
<input type="image" src="images/search-btn.png" />
</form>
</div>
#search{
text-align:right;
padding-top:10px;
}
#search input{
vertical-align:middle;
}
#search .search_input{
width:160px;
margin-right:10px;
padding:6px 10px;
color:#F2AA00;
font-family:'KomikaTextTightRegular',Arial, Helvetica, sans-serif;
font-size:14px;
background-color:#280000;
14 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
-webkit-border-radius: 3px;
-khtml-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
<div id="social_media">
Follow us
<a href="#"><img src="images/icons/twitter_16.png" width="16" height="16" alt="Twitter" /></a>
<a href="#"><img src="images/icons/facebook_16.png" width="16" height="16" alt="Twitter" /></a>
<a href="#"><img src="images/icons/technorati_16.png" width="16" height="16" alt="Twitter" /></a>
<a href="#"><img src="images/icons/rss_16.png" width="16" height="16" alt="Twitter" /></a>
</div>
#social_media{
padding-top:15px;
text-align:right;
color:#FFF;
font-family:'KomikaTitleRegular', Arial, Helvetica, sans-serif;
font-size:15px;
vertical-align:middle;
15 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
There are several examples in the library folder we will mimic 02.html. Rename the file, if needed, delete all
the unnecessary HTML code and replace the images with some sample images.
So, the HTML file for the banner should be something like this:
<div id="container">
<div id="content">
<div id="slider">
<ul>
<li><a href="#"><img src="images/01.jpg" alt="Preview" /><div class="bubble">test</div></a></li>
<li><a href="#"><img src="images/02.jpg" alt="Preview" /><div class="bubble">test22</div></a></li>
<li><a href="#"><img src="images/03.jpg" alt="Preview" /></a></li>
<li><a href="#"><img src="images/04.jpg" alt="Preview" /><div class="bubble">test</div></a></li>
<li><a href="#"><img src="images/05.jpg" alt="Css Template Preview" /></a></li>
</ul>
</div>
</div>
</div>
</body>
</html>
16 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
img{
border:0px;
}
.graphic, #prevBtn, #nextBtn{
margin:0;
padding:0;
display:block;
overflow:hidden;
text-indent:-8000px;
}
/* // image replacement */
#container{
margin:0 auto;
position:relative;
text-align:left;
width:696px;
background:#fff;
margin-bottom:2em;
}
#content{
position:relative;
}
/* Easy Slider */
#slider{
position:relative;
width:760px!important;
background:none;
}
#slider ul, #slider li{
margin:0;
padding:0;
list-style:none;
background:none;
}
#slider li{
width:760px!important;
}
#slider li a{
background:none;
}
#slider li{
/*
define width and height of list item (slide)
entire slider area will adjust according to the parameters provided here
*/
width:696px;
height:241px;
overflow:hidden;
}
#prevBtn, #nextBtn{
display:block;
width:30px;
height:77px;
position:absolute;
left:-30px;
top:71px;
}
#nextBtn{
left:696px;
}
#prevBtn a, #nextBtn a{
display:block;
width:30px;
height:77px;
background:url(../images/btn_prev.gif) no-repeat 0 0;
}
#nextBtn a{
background:url(../images/btn_next.gif) no-repeat 0 0;
17 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
.bubble{
position:absolute;
float:right;
background-color:#036;
width:250px;
height:100px;
margin-top:-240px;
margin-left:500px;
color:#FFF;
}
/* // Easy Slider */
Dont worry if the slider is a little bit buggy, we will fix it in a minute.
Then adjust the CSS to work properly with the new arrows
#prevBtn, #nextBtn{
display:block;
width:50px;
height:40px;
position:absolute;
18 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
left:-50px;
top:71px;
}
#nextBtn{
left:630px; /* this is the li width*/
}
#prevBtn a{
display:block;
width:50px;
height:40px;
background:url(../images/btn-prev.png) no-repeat 0 0;
}
#nextBtn a{
display:block;
width:50px;
height:40px;
background:url(../images/btn-next.png) no-repeat 0 0;
}
Which produces:
Positioning
Now, well set the positioning, width and height of all the banner related divs. Well also fix the JS library to
avoid any problem regarding the additional bubble div.
#container{
margin:0 auto;
width:830px;
position:relative;
text-align:left;
background:#096;
margin-bottom:2em;
padding-left:65px;
}
#content{
position:relative;
}
/* Easy Slider */
#slider{
position:relative;
width:830px;
overflow:hidden;
background:none;
background-color:#09F;
}
#slider ul, #slider li{
margin:0;
padding:0;
list-style:none;
19 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
background:none;
}
#slider li{
width:830px;
height:250px;
overflow:hidden;
}
#slider li a{
background:none;
}
#prevBtn, #nextBtn{
display:block;
width:65px;/*img width +15 padding*/
height:40px;
position:absolute;
left:-65px;
top:185px;
}
#nextBtn{
left:630px; /*Banner Width*/
}
#prevBtn a{
display:block;
width:65px; /*img width +15 padding*/
height:40px;
background:url(../images/btn-prev.png) no-repeat left;
background-color:#066;
}
#nextBtn a{
display:block;
width:65px;/*img width +15 padding*/
height:40px;
background:url(../images/btn-next.png) no-repeat right;
background-color:#066;
}
.bubble{
position:absolute;
float:right;
background-color:#036;
width:250px;
height:100px;
margin-top:-240px;
margin-left:500px;
color:#FFF;
}
/* // Easy Slider */
Bubble Background
20 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
Now, slice the post content background. With only the talking bubbles visible in your .PSD, draw a Slice
named "bg-bubble" and save it as a .png file.
Modify the CSS to add the background and adjust the positioning of the bubble div, accordingly.
.bubble{
position:absolute;
float:right;
width:295px;
height:210px;
margin-top:-255px;
margin-left:535px;
background-image:url(../images/bg-bubble.png);
color:#FFF;
}
Here is how it looks in the browser; remove all the temporary background colors if you wish.
Post Content
To finish the banner section, lets add the HTML for the post content.
<div class="featured_post">
<h2 class="post_title">Post title</h2>
<p class="post_brief">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labo
<div class="post_info">
<span class="author">Posted by <a href="#">Admin</a></span>,
<span class="date">Apr 14</span>
</div>
<div class="post_comments">
<div class="number"><a href="#">29</a></div>
<div class="comments"><a href="#">Comments</a></div>
</div>
</div>
21 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
First, copy the banners /js folder to the template root, then add all the banner images into the /images folder
to the template directory.
Next, add the following code inside the <head> tag of our index.html" file:
And add the banner divs accordingly inside the top_banner div.
/* Top Banner */
#top_banner{
float:left;
width:830px;
height:250px;
padding-left:130px;
padding-top:10px;
background-image:url(../images/bg-banner.jpg);
background-position:center top;
background-repeat:no-repeat;
}
.banner_container{
22 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
float:left;
width:860px;
height:250px;
position:relative;
text-align:left;
}
/* image replacement */
#prevBtn, #nextBtn{
margin:0;
padding:0;
display:block;
overflow:hidden;
position:absolute;
text-indent:-8000px;
}
/* // image replacement */
/* Easy Slider */
#slider{
position:relative;
width:830px;
margin-left:100px
overflow:hidden;
}
#slider ul, #slider li{
margin:0;
padding:0;
list-style:none;
background:none;
}
#slider li{
width:830px;
height:250px;
overflow:hidden;
}
#slider li img{
border:1px solid #FFF;
height:248px;
}
#slider li a{
background:none;
}
#prevBtn, #nextBtn{
display:block;
width:65px;/*img width +15 padding*/
height:40px;
position:absolute;
left:-65px;
top:185px;
}
#nextBtn{
left:630px; /*Banner Width*/
}
#prevBtn a{
display:block;
width:65px; /*img width +15 padding*/
height:40px;
background:url(../images/btn-prev.png) no-repeat left;
}
#nextBtn a{
display:block;
width:65px;/*img width +15 padding*/
height:40px;
23 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
.bubble{
position:absolute;
float:right;
width:295px;
height:210px;
margin-top:-255px;
margin-left:535px;
background-image:url(../images/bg-bubble.png);
color:#FFF;
}
/* // Easy Slider */
/* End of Top Banner*/
We will style the featured post content shortly. At this point, though, you should have something similar to
the following image:
<div id="content_wrapper">
<div id="page_content">
Page content
</div>
</div>
Then, in order to make it look like the design, we will use CSS3 to add the rounded corners to the page_content
div and the page curl we sliced in Step 3.
/*Page content*/
#content{
float:left;
width:960px;
}
#content_wrapper{
float:left;
width:910px;
padding-left:10px;
padding-right:40px;
padding-top:10px;
24 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
#page_content{
float:left;
width:100%;
height:350px;/*temporal*/
background-color:#FFF;
background-image:url(../images/content-page-curl.jpg);
background-position:bottom right;
background-repeat:no-repeat;
-webkit-border-radius: 5px;
-khtml-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-border-bottom-right-radius: 0px;
-khtml-border-radius-bottomright: 0px;
-moz-border-radius-bottomright: 0px;
border-bottom-right-radius: 0px;
}
/*End of Page Content*/
Per the design, we will need to have a squared image with the post title and the categories list placed on two
stripes above it. Lets deal with the HTML first.
Create a div named post and place it inside the page_content div. Then add an image, a title and some metadata
to the container.
25 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
<div class="post">
<img src="images/posts/01.jpg" class="post-image" />
<h2><a href="#">Lorem Ipsum Post Title</a></h2>
<div class="met ad at a"><a href="#">Comics</a>, <a href="#">Movies</a>, <a href="#">Latest Launches</a>, <a href="#
</div>
The CSS for this part is tricky since each post must be 50% width in reference to the page_content container,
plus the stripes should be in front of the picture. Well need to play around with relative positioning and
negative margins to make this happen.
.post{
float:left;
width:445px;
height:230px;
}
.post .post-image{
position:relative;
top:0px;
left:0px;
border:1px solid #FFB800;
}
.post h2{
position:relative;
top:-70px;
left:0px;
width:300px;
padding:5px;
padding-left:10px;
color:#680000;
background-color:#F2AA00;
}
.post h2 a{
color:#680000;
text-decoration:none;
}
.post h2 a:hover{
color:#FFFFFF;
}
.post .metadata{
position:relative;
top:-70px;
left:0px;
width:250px;
padding:5px;
padding-left:10px;
font-size:13px;
background-color:#FFF;
border:1px solid #FFB800;
}
.post .metadata a{
color:#000;
text-decoration:none;
}
26 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
<div class="post">
<img src="images/posts/01.jpg" class="post-image" />
<h2><a href="#">Lorem Ipsum Post Title</a></h2>
<div class="metadata"><a href="#">Comics</a>, <a href="#">Movies</a>, <a href="#">Latest Launchs</a>, <a href="#">Lo
Slice the background image for the post_content div, and save it as a PNG file.
27 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
.post .post_content{
position:relative;
top:-275px;
left:230px;
width:210px;
height:220px;
background-image:url(../images/bg-post-content.png);
background-position:top left;
background-repeat:no-repeat;
}
<div class="post_content">
<div class="post_brief">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut la
</div>
<div class="post_info">
28 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
padding-left:35px;
padding-top:15px;
text-align:right;
color:#FFF;
}
.post .post_info{
width:150px;
margin-left:35px;
margin-top:8px;
padding-top:4px;
text-align:right;
.post .post_info a{
color:#787878;
text-decoration:none;
}
.post .post_comments{
width:50px;
margin-top:37px;
margin-left:56px;
text-align:center;
}
.post .post_comments a{
color:inherit;
text-decoration:none;
}
29 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
30 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
Now that we have the basic post styling finished, lets style the featured post content. Remember how we
had the following code inside the bubble div?
<div class="featured_post">
<h2 class="post_title">Post title</h2>
<p class="post_brief">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labo
<div class="post_info">
<span class="author">Posted by <a href="#">Admin</a></span>,
<span class="date">Apr 14</span>
</div>
<div class="post_comments">
<div class="number"><a href="#">29</a></div>
<div class="comments"><a href="#">Comments</a></div>
</div>
</div>
Add the following CSS and replicate the bubble in all the slides of our rotating banner.
/* Post */
.featured_post .post_title{
height:29px;
padding-top:18px;
text-align:right;
font-family:'KomikaTitleRegular', Arial, Helvetica, sans-serif;
font-size:18px;
color:#680000;
}
.featured_post .post_title a{
color:#680000;
text-decoration:none;
}
.featured_post .post_brief{
height:67px;
padding-left:30px;
overflow:hidden;
text-align:right;
color:#1B1B1B;
}
.featured_post .post_info{
margin-left:30px;
text-align:right;
padding-top:2px;
.featured_post .post_info a{
color:#969696;
text-decoration:none;
}
31 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
.featured_post .post_comments{
text-align:center;
float:right;
margin-top:20px;
margin-right:10px;
width:65px;
height:40px;
}
.featured_post .post_comments a{
color:inherit;
text-decoration:none;
}
/* // Post */
32 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
Instead of the classic sidebar, I wanted to add a widget ready footer. Add the following code inside the footer
div. Inside the sidebar, there will be another container named widget, and, inside that div:
a title
an unordered list and
a div for the curled corner
<div id="sidebar">
<div class="widget">
<h3>Categories</h3>
<ul>
<li><a href="#">Lorem ipsum dolor sit amet</a></li>
<li><a href="#">Consectetur adipisicing elit</a></li>
<li><a href="#">Sed do eiusmod tempor</a></li>
<li><a href="#">Incididunt ut labore</a></li>
<li><a href="#">Et dolore magna aliqua</a></li>
<li><a href="#">Ut enim ad minim veniam</a></li>
<li><a href="#">Lorem ipsum</a></li>
<li><a href="#">Dolor sit amet</a></li>
<li><a href="#">Consectetur adipisicing</a></li>
</ul>
<div class="corner"> </div>
</div>
<div class="widget">W2</div>
<div class="widget">W3</div>
</div>
Now in the PSD file, slice the corner, name it widget-curl and save the image for web as a JPG file. Again, slice
the tiny arrow next to the links, name it arrow and save it as a PNG file.
33 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
/*Footer*/
#footer{
width:940px;
padding-left:0px;
padding-right:10px;
padding-top:20px;
height:250px;/* Temporal */
float:left;
background-image:url(../images/bg-footer.jpg);
background-position:top center;
background-repeat:no-repeat;
}
/*End of Footer*/
/* Footer sidebar */
#sidebar{
float:left;
width:940px;
}
.widget{
float:left;
margin-left:10px;
margin-right:10px;
}
.widget h3{
color:#F2AA00;
34 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
.widget ul{
width:200px;
padding:20px 10px;
background-color:rgba(26,26,26,.5);
border:1px solid #252525;
-webkit-border-radius: 5px;
-khtml-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.widget .corner{
background-image:url(../images/widget-curl.jpg);
background-position:bottom right;
background-repeat:no-repeat;
height:30px;
margin-top:-30px;
margin-right:-2px;
}
.widget ul li{
font-size:16px;
padding-bottom:3px;
color:#FFF;
}
.widget ul li a{
padding-left:20px;
color:#FFF;
text-decoration:none;
}
.widget ul li a:hover{
color:#DC0000;
background-image:url(../images/arrow.png);
background-position:0px 6px;
background-repeat:no-repeat;
}
/* //Footer sidebar */
When tested in a browser, you should see something like the following image:
35 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
First, add the following HTML code as basic markup: an unordered list for the tabs, and divs with different
ids for the content. Im adding a general class, named tab to all the content divs in order to avoid duplicating
the code in the CSS file.
<div class="widget">
<div id="tabs">
<ul>
<li><a href="#tab-1">Popular Posts</a></li>
<li><a href="#tab-2">Recent Posts</a></li>
<li><a href="#tab-3">Recent Comments</a></li>
</ul>
<div class="tab" id="tab-1">
<p>Tab1</p>
</div>
<div class="tab" id="tab-2">
<p>Tab2</p>
</div>
36 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
Lets create a JavaScript document, named tabs.js, and save it in the /js folder. Include it by adding this line
to the <head> tag.
Now, add a basic jQuery tabbed pane by adding the following code to the tabs.js file.
$(document).ready(function(){
$('#tabs div').hide();
$('#tabs div:first').show();
$('#tabs ul li:first').addClass('active');
$('#tabs ul li a').click(function(){
$('#tabs ul li').removeClass('active');
$(this).parent().addClass('active');
var currentTab = $(this).attr('href');
$('#tabs div').hide();
$(currentTab).show();
return false;
});
});
With the JavaScript function working, lets add the styling to make it look pretty. First, well need to slice the
little arrow that points to the selected tab. Name it tab-arrow, and save it as a PNG.
#tabs ul{
background:none;
border:0px;
padding:0px;
margin:0px;
width:428px;
min-height:30px;
height:30px;
-webkit-border-radius: 0px;
-khtml-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
}
#tabs ul li{
37 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
display:inline;
float:left;
text-align:left;
}
#tabs ul .active{
background-image:url(../images/tab-arrow.png);
background-position:bottom center;
background-repeat:no-repeat;
}
#tabs ul .active a{
color:#F2AA00;
}
#tabs ul li a{
display:block;
margin:0px;
padding:0px;
color:#5A5A5A;
#tabs ul li a:hover{
background-image:none;
color:#F2AA00;
}
#tabs .tab{
width:405px;
padding:20px 10px;
min-height:170px;
/*This is to get the arrow above the tab*/
margin-top:-6px;
background-color:rgba(26,26,26,.5);
border:1px solid #252525;
-webkit-border-radius: 5px;
-khtml-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
/* //Footer Tabbed Pane */
Now you should have the tabbed panel working; lets add the content inside!
38 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
<span class="item">
<h4><a href="#">John Doe</a></h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore...</p>
</span>
<span class="item">
<h4><a href="#">Jane Smith</a></h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore...</p>
</span>
<span class="item">
<h4><a href="#">SpiderHuman</a></h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore...</p>
</span>
/*Tabs Content*/
.tab .item{
float:left;
padding:5px 10px;
-webkit-border-radius: 7px;
-khtml-border-radius: 7px;
-moz-border-radius: 7px;
border-radius: 7px;
}
.tab .item:hover{
background-color:#000;
.tab .item:hover h4 a{
color:#F2AA00;
}
.tab .item h4 a{
color:#FFFFFF;
text-decoration:none;
}
.tab .item p{
color:#909090;
39 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
font-size:15px;
}
.pager{
float:right;
text-align:right;
padding-right:40px;
}
.pager a{
color:#4A4848;
padding-left:5px;
}
.pager a:hover{
color:#F2AA00;
}
.pager a.active{
color:#D11300;
}
/* //Tabs Content*/
Replicate the HTML for each tab. This is how it should look:
Step 21 - Footer
Finally, add the footer navigation bar and the copyright information:
<div id="footer_content">
<ul id="footer_nav">
<li><a href="#">Home</a></li>
<li><a href="#">About us</a></li>
<li><a href="#">Contact us</a></li>
<li><a href="#">Privacy Policy</a></li>
<li><a href="#">Sitemap</a></li>
</ul>
<div id="copyright">Tuts+</div>
</div>
Now slice the 1px gradient line from the PSD file, name it "bg-footer-line" and save it as a JPG. Lastly, edit the
CSS to set everything up.
/* Footer Nav */
#footer_content{
float:left;
width:940px;
height:45px;
40 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
padding:10px;
margin-top:10px;
background-image:url(../images/bg-footer-line.jpg);
background-position:top center;
background-repeat:no-repeat;
#footer_nav{
#footer_nav li{
display:inline;
}
#footer_nav li:last-child a{
border-right:none;
}
#footer_nav li a{
color:#515151;
padding-right:5px;
border-right:1px solid #292929;
}
#footer_nav li a:hover{
color:#F2AA00;
}
#copyright{
float:right;
padding-right:30px;
}
Conclusion
41 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
And thats it! Were finished with the conversion process. The code here was tested in all major browsers. If
you need IE6 and 7 compatibility, it shouldnt be a big deal to write a few of fixes for them specifically. Our
design is now ready to be integrated into any CMS as a skin. Good luck and thank you so much for reading!
By Alvaro Guzman
This author has yet to write their bio.
42 of 43 09/09/2013 12:53 PM
Create a Comic Book Themed Web Design, Photoshop to HTM... http://net.tutsplus.com/tutorials/site-builds/create-a-comic-bo...
Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
43 of 43 09/09/2013 12:53 PM