Monday, September 1, 2008

Customized Feedburner Subscription Box

Recently I received a lot of feedback about the RSS subscribe box I made for this blog. It seems some folks were curious as to how I put it together. To tell the truth I didn't think it was that big a deal, but they seem to think it's quite cool. So in this post I will try to explain how I built my subscribe box.
Before we begin please keep the following in mind:
  • I'm not great at writing tutorials or code.
  • There are probably much better ways to do this.
  • Always read and research things for yourself.
  • If anything is unclear just let me know in the comments.
  • Please do not use my graphics for your box design (make your own).
Below is a list of sites that will help you better understand what I will be talking about in this tutorial:

W3Schools: CSS Syntax
W3Schools: CSS Tutorial
Padded Cell: What is a DIV?
A List Apart: Practical CSS Layout Tips, Tricks, & Techniques
W3C: The CSS Box Model
JuicyStudio: Div Mania
CSS Classroom - Div vs Span

And so, on with the show ...

When I signed up with Feedburner I wasn't too thrilled about the subscription code they provided. Naturally I had to give it a personal touch. I already had the design envisioned in my head so all I had to do was build it in Photoshop, slice it up, and put some code around it.

I created a Photoshop document the same width and fill as my sidebar area (223 pixels). Then I drew my odd-shaped background with the Pen Tool and (for continuity's sake) filled it with the same color as my post area.


Knowing that the Feedburner code would need some room in the middle of this design I laid out a few guides ...


Next I picked the font. I used Sanitarium from Blambot Fonts because it's wacky just like me. As you can see the letters did not come out exactly as I have it now so I had to do some adjusting.


To adjust the lettering I converted the type layer into paths by going to Layer > Type > Create Work Path. I always convert my text to paths because then if I need to adjust the letters (as I did here) it's very easy to do so.


After I was satisfied with the arrangement of the letters I filled the text paths and moved the title into place. I added a stroke and a drop shadow to give it some pop, then I dropped in my FatBirds. The blue FatBird saying 'Via RSS' would become a link to my Feedburner feed and the yellow FatBird saying 'What's RSS?' would be a link to the Feedurner FAQ page describing RSS for people who don't yet know what it is.


It is now time to slice the design up and build some code around it. In the past year or so I have read a ton of design-related articles that suggest using CSS to build your content, as opposed to tables. So for this tutorial I will be using CSS to position and style everything in the subscribe box.

First, to make things easier, let's look at the written code for the box so you have something to refer back to ...
<style type="text/css">

#container {
background:#FEF6D2;
width: 206px;
margin: auto;
}

#top {
height: 78px;
margin: auto;
}

#rss {
height: 76px;
margin: auto;
}

#leftnav {
float: left;
width: 16px;
background: url(images/sub_left.gif) no-repeat;
height: 137px;
margin: auto;
}

#rightnav {
float: right;
width: 21px;
background: url(images/sub_right.gif) no-repeat;
height: 137px;
margin: auto;
}

#content {
text-align:center;
background:#FEF6D2;
font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif;
color: #4F3314;
font-size:11px;
margin: auto;
}

#footer {
clear: both;
height: 62px;
margin: auto;
}

</style>

<div id="container">

<div id="top"><img alt="Subscribe to TBODC" src="images/sub_top.gif" title="Subscribe to TBODC"/></div>

<div id="rss"><a href="http://feeds.feedburner.com/blogofdc"><img border="0" alt="Subscribe via RSS" src="images/sub_rss.gif" title="Subscribe via RSS"/></a></div>

<div id="leftnav"></div>

<div id="rightnav"></div>

<div id="content">

<form action="http://www.feedburner.com/fb/a/emailverify" target="popupwindow" method="post" onsubmit="window.open('http://www.feedburner.com/fb/a/emailverifySubmit?feedId=2060905', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">

<div style="margin: 5px 0 5px 9px;">Or Subscribe by E-mail:</div>

<input style="width:140px; margin: 0 0 5px 10px;" name="email" type="text"/>
<input value="http://feeds.feedburner.com/~e?ffid=2060905" name="url" type="hidden"/>
<input value="The Blog of Doug Cloud" name="title" type="hidden"/>
<input value="en_US" name="loc" type="hidden"/>

<input style="margin: 3px 0 0 9px;" value="Subscribe" type="submit"/><br/>
</form>

<div style="margin: 5px 9px">Delivered by <a href="http://www.feedburner.com" target="_blank">FeedBurner</a></div>

<a href="http://feeds.feedburner.com/blogofdc"><img width="88" style="margin: 0 0 0 6px; border:0" alt="" src="http://feeds.feedburner.com/~fc/blogofdc?bg=4F3314&fg=FEF6D2&anim=0" height="26"/></a></div>

<div id="footer"><a href="http://www.google.com/support/feedburner/bin/answer.py?answer=79408"><img border="0" alt="What's RSS?" width="206" src="images/sub_whatsrss.gif" height="62" title="What's RSS?"/></a></div>

</div>
Now let's take a closer look at the above code. The top section is the CSS, contained within the <style></style> tags. Below that are the divisions, more commonly referred to as divs.

Each 'div' is defined by an 'id' in the CSS. An 'id' is simply a name that can be used to define the attributes of an HTML element. For instance, the 'div' which houses all the other 'divs' is the 'container' (represented by the thick red outline in the image below). Think of this main container as a table, and all the other 'divs' (white sections) are like nested tables within this main one.


The position and style of the main 'container' as well as all the other 'divs' will be determined by the attributes I give them in the CSS. For instance the 'container' div (shown below) ...
<div id="container">
Would get it's attributes from the CSS style (shown below) ...
#container {
background:#FEF6D2;
width: 206px;
margin: auto;
}
And so forth. Every 'div' has it's own unique 'id'. For instance, the 'container' has a background color, a width, and automatic margins, all defined by the property 'id' (#container) in the CSS above. I used automatic margins to keep the design from having unnecessary spaces when rendered by different browsers.

The following 'divs' will just be housing images so they don't really need any fancy attributes, aside from the ones I've assigned them ...
#top {
height: 78px;
margin: auto;
}

#rss {
height: 76px;
margin: auto;
}

#footer {
clear: both;
height: 62px;
margin: auto;
}
As you can see these 'ids' don't have a lot of fancy CSS, just height and margin properties. I used the property "clear: both;" only for the footer image. The reason I did this is because the left and right images for the sides of the container are floated, like so...
#leftnav {
float: left;
width: 16px;
background: url(images/sub_left.gif) no-repeat;
height: 137px;
margin: auto;
}

#rightnav {
float: right;
width: 21px;
background: url(images/sub_right.gif) no-repeat;
height: 137px;
margin: auto;
}
You only need the clear property when you have elements below a floated element which must remain below it, as in the image below ...


Which value to give the clear property depends entirely on the direction you give the floats. If you give an element 'float: left' and you need subsequent elements to clear it, use 'clear: left'. If you give an element 'float: right', then use 'clear: right'. The property 'clear: both' is only needed when you have both left and right floated elements that need to be cleared, such as the footer.

Next I pasted the entire Feedburner form code into the middle 'div' giving it an 'id' of 'content', like so...
#content {
text-align:center;
background:#FEF6D2;
font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif;
color: #4F3314;
font-size:11px;
margin: auto;
}
The content 'id' in the CSS (above) defines the properties for that particular 'div'. The form itself did not need any styles except for some elements that I needed to align, such as the text, text box, Subscribe button, and FeedCounter (numbers 1 thru 5 in the image below). For these elements I used inline styles, like so...
<div id="content">

<form action="http://www.feedburner.com/fb/a/emailverify" target="popupwindow" method="post" onsubmit="window.open('http://www.feedburner.com/fb/a/emailverifySubmit?feedId=2060905', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">

1) <div style="margin: 5px 0 5px 9px;">Or Subscribe by E-mail:</div>

2) <input style="width:140px; margin: 0 0 5px 10px;" name="email" type="text"/ >

<input value="http://feeds.feedburner.com/~e?ffid=2060905" name="url" type="hidden"/>
<input value="The Blog of Doug Cloud" name="title" type="hidden"/>
<input value="en_US" name="loc" type="hidden"/>

3) <input style="margin: 3px 0 0 9px;" value="Subscribe" type="submit"/ ></form>

4) <div style="margin: 5px 9px">Delivered by <a href="http://www.feedburner.com" target="_blank">FeedBurner</a>

5) <a href="http://feeds.feedburner.com/blogofdc"><img width="88" style="margin: 0 0 0 6px; border:0" alt="" src="http://feeds.feedburner.com/~fc/blogofdc?bg=4F3314&fg=FEF6D2&anim=0" height="26"/></a>

</div>

And thus we have the finished subscribe box...


It took me about a week to figure all of this out and it may take you some time, too. Learning even simple HTML and CSS is not an over night process, but in the end there is no greater satisfaction than learning how to do something like this yourself. Hopefully I have explained enough so that you can get a good start on how to proceed with your own design.

Jacob Gube over at Six Revisions has posted 20 Websites To Help You Learn and Master CSS. I suggest you bone up on these articles as well as the ones I linked to in the beginning of this post.

For writing the code I use the portable version of Notepad++. I highly suggest using a similar program to write the code in because it makes things much easier in the long run. Notepad++ also has the ability to preview your code in Firefox and Internet Explorer so you can see how you're doing.

Thanks for reading and I look forward to your comments.

73 comments:

Marf said...

I didn't know you could convert text to paths like that.

Mark said...

Really cool tutorial i love it.. Thank you!!

Bobby said...

Wow this is what I've been waiting for. Finally a tutorial on how to customize feedburner subscription box plus a bonus on how to do it using Photoshop.

Dude your site/tutorial was specially mentioned and featured at Blogger Buster check it out :)

Thanks DC and more power


Bobby

Anonymous said...

You said you can't write tutorials? I think someone is being modest, that is a great tutorial about it, well done.

Craig Farrall
http://blog.cfdesignz.co.uk

Versi said...

Wow! Very impressive, I think I'm gonna follow your tutorial to customize my own feedburner subscription box even if it take me over a month to do it right!

dcloud said...

Marf, that's the amazing thing about Photoshop - you can use it for years and still not know everything. Thank God for the Web, eh?

Mark, thank you for the 'Thank you!' [grin]

Bobby, thank you for your comment. Amanda asked if she could feature the tutorial on her site and I said I would be honored. She is definitely a Blogger Guru.

Craig (a.k.a Anonymous), thanks :)

Versi, thank you. I'm glad the tutorial inspired you. I would love to see your own subscribe box so let me know when you get it finished.

PALS said...

Nice one mark. Will you offer a header design for free?

dcloud said...

Pals, are you talking to me? If so my name isn't Mark. And as for the free header you should check out this post here:

http://www.dcblog.net/2008/08/can-you-make-me-free-graphic_417.html

HR Wench said...

If I had Photoshop, I would be all over this! Unfortunately, I don't. All I really want to do is make the regular old feedburner email subscription box smaller (it's too big and looks weird in my opinion). I've tried to manipulate the HTML but it just reverts back to feedburner's dimensions. Any advice?

dcloud said...

Hi, Jenn. Thank you for the comment. I took a peek at your blog code and saw your sidebar is 285 pixels wide, as shown here in your code:

#side-wrapper {
float: left;
margin: 0px 0px 0px 0px;
padding: 25px 0px 0px 0px;
width: 285px;
background: #ffffff;
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden; /* fix for long non-text content breaking IE sidebar float */
}

All you would need to do is create a 'div' to put your Feedburner code into (as I have shown in the tutorial) and give that a width of whatever size you want - anything smaller than the width of your sidebar (285 pixels).

O-OM said...

wow, its cool n very beautiful. i like it, i want to review on my blog. thanks

rohman said...

Wow. that's very cool and clearly tutorial. thank for your info

mymoen said...

wauw... it's amazing tutorial.. i'll trying to use in my blog..

roney said...

wow brilliant idea, thank for the tutorial dud, i'll try it :)

project said...

nice design D.C, waiting for next tutorial about another design
I have linked u in my blog

Thank's

dcloud said...

Agus, Kang, mymoen, roney, project, I'm glad the tutorial helped inspire you. Let me know if you build your own subscribe box. I'd like to see them.

Ecko said...

Nice tutorial of a very nice widget. Unfortunately, my blog theme doesn't support this kind of RSS feed subscription box. It's absolutely nice, I really like it. But, it will look strange to place a cartoon box on the non carton template. It works good here because your template supports it. Why don't you make a tutorial about making a funny cartoon template like this blog's too? I think many blogger will like that tutorial.

Just an idea.

We-link said...

Thx much,DC..It's a great idea.
you're so creative..
Success for you..

dcloud said...

Ecko, you don't have to make a design just like mine. The tutorial is merely about how I added some personality to an otherwise bland code. It's purpose is to inspire others to do the same thing, but with their own design. Nice idea about the template. I'll work on something for that. Thanks.


We-link, thank you.

Anonymous said...

your blog is cool !

MICK said...

It's very cute cartoon, I hope you make another design ...

sincerely .

Rizal said...

your post very good.....

Sofwan said...

amazingg....i like it

Syamsul Alam said...

IT... IS... SO... COOL...

I can't stand it!!

How could you have done all of this by yourself?!

You're so creative...

Where do you learn all of it?!

I'm so envy on you....

It must be great to have friend like you...

Ridho said...

It's a good / Best tutorial ever i seen about Feedburner, I want to try it, but I think It will exhaust my time. Sorry, if my english very bad.

HR Wench said...

Thanks Doug. It's still a bit over my head - but I will read through your post again and see if I can figure it out.

techniqueal t. said...

wow, this is a cool tutorial! i am just starting to learn css and this entry made me understand it easier. your subscription box looks fantastic! =)

erwin said...

cool

dcloud said...

Thanks for the comments everyone. I appreciate your feedback and your compliments. Ecko, thanks to your suggestion I have started a four part tutorial on the making of TBODC. I hope you all enjoy it.

FreeDown said...

waw..... its really nice to see and so qiut.. i want it.... but not suitable with my blog ehm... ;)

house128bpm said...

waaw, great tutorial but looks like not easy to use it...

Sharon said...

Hey, I think that's pretty awesome.....

Now if someone can come up with a hack to make our feedburner emails must more prettier, than please let me know.....

:)

dcloud said...

Thanks, Sharon. Feedburner does offer a few 'tweaks' you can make to your subscription e-mails. Just go to your Publicize tab, choose E-mail Subscriptions, and then click on 'E-mail Branding'. In here you can customize things like adding a logo, changing the font (color, size, etc.), choosing a time period for the e-mails to be sent, and even change the text of the subscription confirmation e-mail.

Hello said...

Thanks dude. It's an amazing tutorial for learners.

Dekhar's Blog said...

Wouw, it's look very good for the subscribe box.

yoxx said...

awesome work....
must be bookmarked...
thanks DC

Miles said...

This is great! I want to learn how to draw on the computer like this.

Miles

Web Market Journal said...

I couldn't ask for a better tutorial...EXACTLY what I was looking for...Thanks, Doug!!

imanlinuxer said...

wooow...interest, I like it

Farah said...

Hiya Doug!
How's it going?
I finally got the courage to work on a subscription box like you. There are some similarities, but I tried do it on my own design. I'd really appreciate if you check it out on my blog and share your opinion. I'd also like to know if there's anything I can do to improve the coding.
Thank you very much for this awesome tutorial!

TrailBlazer said...

This is cool.
Very nice and well managed blog.
10/10 marks.

Wisdom Credit Cards

Cathy Laine said...

thanks for the tips!

Acunk said...

awesome.... thanks 4 the tips

Michael Stewart said...

Great tutorial the final creation looks great. Thanks for the tutorial, keep up the great work.

thegundul said...

ehm, thanx for the tutor,
i hope i can use it for my blog


thanx

oentoe09 said...

wow..finally i find this tutorial..
Thank u very much :)

torik said...

thank this tutorial

Shafar said...

I have a post in my blog about customizing feedburner email form.. Not good as dcblog, yet mine is simple tips! Take a look!

CLICK HERE...

iBnu said...

thanks vey much
for your tutorial

Gennice said...

This is best and easiest to apply and learn tutorial on CSS that I have ever read. Thank you so much! Excellently written.

You said at the start that you are not good with writing tutorials, so I must say that's wrong. You are actually an amazing tutorial writer!

Keep up the good work. Thanks again!

Instrumentation and control engineering said...

thanks for this great post, do you have some codes for this...

Doug Cloud said...

I'm glad the tutorial has helped and inspired everyone. Thanks for taking the time to leave your comments. I appreciate your feedback.

Prashant said...

Thanks for the post. It was very well written and an excellent guide. I managed to use it to create the subscription links for the blog header.

Thanks again!

Orangemallow said...

thank's DC this is a great tutorial, I try to design myself, but i think my subcription box doesn't support with my template............
what do you think? thank's DC

Doug Cloud said...

Thanks, Orangemallow. The design has nothing to do with your template. You just make a box design like you want and create the code to house it in (like in this tutorial).

d'Mocca said...

wow, nice share dude..
i am from indonesia and newbie about blogger world..
Can i have request for subscribe your blog?

kuryt said...

Blog walking...

thanks for your information i like it so much..And i hope you can up to date you information every day

visit our bog in Myokezone

acne skin problems said...

quite lengthly post but helpful..
thanks i have customized my box to some extend..

Richard said...

This is so GREAT! I'll try it on my own, and hope that I'll have the same result. Thanks for sharing DC and looking forward for your next post!

San Diego seo

3ndur0 said...

thx 4 U'r Share

jadmikoz said...

Thx.. I like it.. i try later .. :D

çiçekçi said...

For sharing thank you very much good very beautiful

Ahnan Alex, S.S said...

WOw! It's really cool! Would you be my teacher?
It's my blog : www.alexways.blogspot.com

Albanicus said...

Wow,thanks for the great tutorial. Bookmarked you.

Greetings from www.blogalit.com

Yolanda Morris said...

By far one the best customizing tutorials I've read thus far. I was really hesitant to use div's and css, but I guess there is no getting around it if you want a customized subscriber area.

lily carmen said...

For sharing thank you very much good very beautiful work hi

Ichi said...

Your blog is so cool. You deserve to be a great designer. I'm form Indonesian blogger. A newbie. Nice 2 meet you.

Roschelle said...

Doug, this is so cool. My head is spinning. I don't think I could ever get it right.

Tracy said...

That's a great tutorial, definitely something for me to put on my to-do list.
Thanks
Tracy

Shred This Way! said...

whow this is sweet man .. wish i was a programmer to understand all this stuff .. do you think u can design a smaller subscription box for my site http://shredthisway.blogspot.com

lemme know pls at shredthisway @ gmail.com

thanks man

Vin
http://shredthisway.blogspot.com

Doug Cloud said...

Sorry, but I don't do work for free. And this stuff isn't hard to comprehend - you just need to study about it (using Google you can find anything) and practice.

That's why I wrote this tutorial and supplied links to sites about coding so people could learn how to do this themselves.

paul crowe said...

Great tutorial, you are a talented guy :D

I try to stay away from photoshop once you log in you dont see 3-4 hours passing.

Paul

Doug Cloud said...

LOL .. so true, Paul, so true. But I have to get the work done so let the hours fly. Of course there's always breaks for Zelda.

Hello and welcome to TBODC! If you like the article you just read you can subscribe here to get updates via RSS or opt to have them sent directly to your inbox. I appreciate your feedback so please feel free to ...

Post a Comment