Posted on 28th May 2008 by Lindsey in internet |Uncategorized
ajax, Articles, bc, buddypress, canada, cheap, CMS, CSS, css sprites, dialup, discounts, drupal, gadget, hosting, html, HTML/XHTML, inexpensive, islandnet.com, joomla, mysql, news, perl, photoshop, php, programming, python, reliable, resources, rewards, seo, Tutorials, unlimited databases, unlimited email, v4, v5, victoria, web design, wordpress, wp, XHTML, xoops
If you’re not using CSS Sprites (also known as the CSS Image Replacement Method) you should be. Many coders seem to fear this easy and basic way to use images with CSS and I’m not sure why.
The benefits of CSS Sprites are plentiful, but you (and your visitors) will benefit from this method ten-fold. For the coder it’s less slicing and cropping of images, and for the user it rids us of that annoying image loading flash when you use CSS to replace background images.
I’ll take you through some quick steps to get started with CSS Sprites.
First, fire up Photoshop (or your graphic editor of choice).
For this example we will start easy and make a background (and hover state) for one tab.
First Create a new document (CTRL + N) width a width of 100px and a height of 50px. Than fill in the background with the color of your choice. I’m using black (#000000).
Next, click on the shape tool and select the rounded rectangle (SHIFT + U). Drag the shape until you get a nice looking tab. Double click the shape’s color box and choose a color for your tab. I’ve chosen red (#ff0000). Now, choose the move arrow and drag the shape so the bottom half of the rounded rectangle is outside of the viewing box so it looks like this:

Now, let’s make sure our tab is centered in the box. Select all (CTRL + A) and make sure the tab’s layer is selected. Click on the arrow (move) tool again. Now on the top tool bar click the “Align horizontal centers” icon (see image below):

Now, we can style our tab a bit. I’ve added an inner shadow to give the tab some depth (double click shape layer to have layer styles dialog appear):

Great. Now, the next step is up to you. You can leave the tab blank and have text overlay it through the HTML, or you can use a stylized text. I’ve chosen to use a font that isn’t available through CSS/HTML so I’ve added that to image. (To make sure your font is centered repeat the step above and “align horizontal centers”):

Great, so we have our first tab. Now we need to create our hover state for this tab. Duplicate your tab by right-clicking the title bar and selecting “Duplicate”.
Now on the duplicated tab I’ve changed the background color to a light blue (#00a8ff) (double click shape color box again to have color dialog appear).
Now, back to the original red tab I am now going to merge the two tabs together. For this example I am going to place the two tabs side by side, but that’s a preference left up to you. You can also stack the images on top of each other – or put them in any order you prefer.
So, right click on your original tab’s title bar and select “Canvas Size…” from the drop down. Click the LEFT arrow, and change the width to 200px (increase your canvas size by the width -or height if you are stacking) of your tabs).

Now, to the right of your image you will have an extra 100px. Now, go back to your hover state image. Select all three layers and press CTRL + G. This will group all three layers into a folder. Now select the move tool (black arrow) and drag the image into the first image. Now adjust the grouped layer so it sits EXACTLY next to the original with the same height and width (you won’t see any of the transparent background if you do this correctly).
You should then have an image that looks similar to this:

And that’s it for the photoshop work!
Now, fire up your text editor.
Here is the HTML:
Home
And here is the CSS:
a.home {
background:url(tabs.gif) no-repeat;
float:left;
text-indent:-9999px;
height:50px;
width:100px;
}
a.home:hover {
background-position: -100px 0;
}
Also if you want to use this as your “current” style (highlight the current page) you can add that class to the CSS so it would look like this:
a.home:hover, a.active {
background-position:-100px 0;
}
Not so hard right?? Check out the HTML and CSS for CSSgirl and you will see that for my main nav “images” I am using CSS Sprites. For this site though I used one large image that contained all the images for both the original nav and the hover states. So my HTML looks like this:
And my CSS looks like this:
#navi {
float:left;
width:520px;
height:48px;
}
#navi a:hover {border:none;
}
#navi a {
background:url(images/navigation.gif);
height:48px;
display:block;
float:left;
text-indent:-9999px;
}
#navi a.home {
background-position:0 0;
width:94px;
}
#navi a:hover.home {
background-position:-425px 0;
}
#navi a.about {
background-position:-95px 0;
width:91px;
}
#navi a:hover.about {
background-position:-520px 0;
}
#navi a.portfolio {
background-position:-186px;
width:128px;
}
#navi a:hover.portfolio {
background-position:-611px;
}
#navi a.contact {
background-position:-314px;
width:107px;
}
#navi a:hover.contact {
background-position:-739px;
}
#navi a.free {
background-position:-852px;
width:98px;
}
#navi a:hover.free {
background-position:-953px;
}
Get out there and try it! Show me how it turns out. I’d love to see what you guys can do with this.
Posted on 27th May 2008 by Lindsey in internet |Uncategorized
ajax, Articles, bc, buddypress, canada, cheap, CMS, cross browser compatibility, CSS, css cross browser compatibility, dialup, discounts, drupal, gadget, hosting, html, HTML/XHTML, ie conditionals, ie cross browser compatbility, ie css conditional, ie6, IE7, inexpensive, internet explorer, islandnet.com, joomla, mysql, news, perl, php, programming, python, reliable, resources, rewards, seo, Tutorials, unlimited databases, unlimited email, v4, v5, victoria, wordpress, wp, xoops
What’s worse than spending a week coding a brand new design to realize that your site looks like a bloody mess in IE6? Luckily we have a valid way to fix these problems without having to use hacks in our CSS and destroy the completed design that looks good in all other browsers.
IE Conditionals are an easy and awesome (and valid!!) way to insert any IE specific styles* into your code. You can specify styles for just IE6, just IE7 or for both. Not only that you can specifiy styles to affect all versions of IE below any version number. (*actually these conditionals can be used for anything that you want to display to IE specifically)
For example, say you have some margin adjustments to make that effect only IE6, in the head of your HMTL document you could put this:
Or, say you need it to affect IE6 and all previous versions:
The above code tells the browser to apply these styles to IE6 and any version LESS THAN it.
You can also use the and/or syntax (& / |) if you need the styles just applied to certain versions:
You can also use the & symbol to combine styles for one browser ex: [if (IE 6) & (IE 5)].
If you have a substantial amount of styles (or aren’t using a templating system where the header is isolated) I recommend using the conditional to link to a seperate IE stylesheet:
See more examples and the complete variable list over at Microsoft’s Developer Network.
Posted on 24th May 2008 by Peter in internet |Uncategorized
ajax, bc, buddypress, canada, cheap, CMS, design, dialup, discounts, drupal, gadget, hosting, html, inexpensive, islandnet.com, joomla, mysql, news, perl, php, programming, python, reliable, rewards, seo, unlimited databases, unlimited email, v4, v5, victoria, wordpress, wp, xoops
Hello new visitors! I can’t express how happy I have to have made the “hotlist” on del.icio.us, please bookmark and stick around. SG is going to have a massive face lift this week to refocus on bringing to light more cutting edge web development and design, stay tuned!
Posted on 20th May 2008 by Lindsey in internet |Uncategorized
ajax, bc, buddypress, canada, cheap, CMS, cssgirl, dialup, discounts, drupal, gadget, General, hosting, html, inexpensive, islandnet.com, joomla, mysql, news, perl, personal, php, programming, python, reliable, rewards, seo, unlimited databases, unlimited email, v4, v5, victoria, wordpress, wp, xoops
I don’t know how or what I did ;O but after messing with some stuff this morning I ended up breaking this site in IE6/IE7. I’m sorry for any IE users I don’t have the time to fix it either. Guess you will just have to wait 2 weeks for the new CSSgirl to emerge (possibly sooner)!
So just because I feel bad I’ll throw out another (scaled down) sneak peak of the new design:

Posted on 20th May 2008 by Lindsey in internet |Uncategorized
ajax, Articles, bc, buddypress, canada, cheap, CMS, CSS, css tutorial, dialup, discounts, drupal, gadget, General, hosting, html, html tutorial, HTML/XHTML, Images, inexpensive, islandnet.com, joomla, mysql, news, perl, photoshop, Photoshop Tutorial, php, polaroid, programming, python, reliable, resources, rewards, seo, tutorial, Tutorials, unlimited databases, unlimited email, v4, v5, victoria, web design, wordpress, wp, xoops
I’m a big fan of polaroid’s. I love the fact that you can snap a photo and the camera will spit out a photo for you instantly. I love the style so much in the new version of CSSgirl (to be released within the next two weeks!!!) has incorporated their style in the new design. I thought I’d share how I went about creating the image and the HTML/CSS behind it!
First, you will need to decide what size you want your polaroid images to be. I’ve decided on a simple 100×100 space for the actual image. If you want your images bigger/smaller just increase your polaroid size as needed. Create a New Document (CTRL + N) with a height and width of 100px.
Next, fill the entire document with black.
Now, right click on the title bar of the document so the drop down appears and select “Canvas Size”. A window will pop up – first click on the arrow that points up. Now for height fill in 130.

Your document will add the 30 pixels to the bottom of the image. Next, right-click the title bar again and select “Canvas Size” again. This time just fill in the width as 120 and click “OK”.

Ok, once more! When the Canvas Size window is opened this time click the bottom arrow, and fill in 140 for the height. You will now have 10px added to the top of the image.

Next, on your layers palette CTRL + Click Layer 1, which will have just your black square on it. When you do this the black square will become selected.

Now, press CTRL + SHIFT + I. This will inverse your selection so instead of your black square being selected the area surrounding it will become selected. Now, press CTRL + SHIFT + N. This will create a new layer, which we will use the paint bucket and fill with white.

Great! So we are almost done. I like my polaroid images to have a little bit of “realistic” feel to them, so I’m going to add some shadowing. You will need to drag Layer 2 (our white layer) beneath Layer 1 (black fill).

Next, double click on Layer 1, the black fill layer so that the layer styles window pops up. Choose “Outer Glow” and set the blend mode to “Multiply”. Then click on the color box and change it to black (#000000). Take the Opacity down to about 30%, than click ok. It’s a very subtle change, but I think it gives it a better look.

One last step – first, I create another new layer CTRL + SHIFT + N. Then I moved the new layer beneath the layers that we already had. Next, fill that layer with whatever background color you’re polaroid style images will be resting on. I’m using a white background. Now, right click the title bar and choose “Canvas Size”. Add 10px to both the height and width – you will end up with a width of 130 and a height of 150.
Now, double click layer 2 (the white frame layer). Your layer styles window will pop up. Next, click on “drop shadow”. Take the opacity down to 30% and change the angle to 85 degrees. Next change the distance to 2px and the size to 4px. If you are using a background color other than white you will need to adjust these things as neccessary.

Next, click on stroke. Make sure the size is only 1px. Now click the color box and change the value to “#f8f7f7″.
Ok, so if you want to do some extra shadowing or styles you can have at it. Once you have it looking the way you want, save the images (CTRL + SHIFT + ALT + S). Save it as a .gif.
You can also download the .psd or .gif file.
So here is our finished product:

Now we need to write the CSS/HTML to have the images we choose use this background. It’s very simple. Choose the 100x100px image you would like to have use the polaroid style.
Here is the CSS:
img.polaroid {
padding:10px 10px 30px 10px;
background:#fff url(polaroid.gif) no-repeat;
}
And the HTML:
class="kids.jpg" alt="My three babies!" />
Here is how it will look:

We can also go a bit fancier by adding a caption to the polariod by changing up our CSS/HTML a little:
.polaroid {
width:130px;
height:150px;
background:url(polaroid.gif) no-repeat;
color:#000;
font:11px 'trebuchet ms', arial, sans-serif;
}
.polaroid img {
padding:15px 15px 0 15px;
}
.polaroid p {
margin:0;
padding:0;
margin:0 15px 0 15px;
}
And the HTML:
class=
"polaroid">
![]()
src=
"kids.jpg" alt=
"My babies!" />
My babies on Easter 2008.
And the result:
Easter 2008.
What’s really great about this is that with just those few simple styles you can use this style on a whole gallery. Or for anything. For example on iheartswitch.com for the archives section I used a similar method to have the archive image and short description appear.
Posted on 18th May 2008 by Lindsey in internet |Uncategorized
ajax, Articles, bc, buddypress, canada, cheap, CMS, Code, CSS, dialup, discounts, drupal, gadget, hosting, html, HTML/XHTML, inexpensive, islandnet.com, joomla, mysql, news, perl, php, programming, python, reliable, resources, rewards, seo, Tutorials, unlimited databases, unlimited email, v4, v5, victoria, web design, web development, wordpress, wp, xoops
I’ve noticed a lot of sites have a very complicated way of styling the code samples they provide, using multiple span
classes and/or inline styles and many, many
s. Other times the site just wraps the code in a
attribute and doesn’t highlight the different syntaxes.
I’ve written some simple CSS styles to fix this problem. So if you are interested in having your code display as if it was in a text editor with syntax highlighting here is an easy way to do it.
The first example is a sample of CSS code and how it can look when you apply these styles (***This is not the actual styles, just an EXAMPLE):
/*Center Content Depending on screen size/resolution*/
#container {
position:relative;
width:800px;
margin:0 auto;
}
/* LOGO, Searchbox, Product Links*/
#header {
float:left;
width:800px;
clear:both;
background:url(images/top-border.gif) bottom left no-repeat;
padding-bottom:25px;
}
#header h1#logo {
float:left;
width:195px;
height:65px;
}
By wrapping the code in a div
I assigned the class “css” to and using strong
and em
s within I have a nice stylized version of my code.
Here is an example with xhtml:
href="product.html" class="first">Registry
href="product.html">Innovative Community
href="product.html">About Innovative Baby
href="product.html">My Account
href="product.html" class="last">Help
class="email">href="product.html">
email this to a friend
id=
"left">
class=
"shop-by">
![]()
src=
"images/shop-by-brand.gif" alt=
"Shop By Brand" />
Nice right? Here is the CSS that controls how the examples above look:
.entry .css, .entry .xhtml {
border:1px dashed #ccc;
float:left;
padding:5px;
font:12px 'courier mono", georgia, serif;
display:block;
margin:10px 0;
clear:both;
/*If you have a long line of code and don't want to to make the box expand outside
of the elemnt you are putting your code in, set a width here and set the overflow to scroll
width:450px;
overflow:scroll;
*/
}
.entry .css em, .entry .xhtml em {
color:#666;
text-transform:uppercase;
font:10px 'trebuchet ms', arial, sans-serif;
}
.entry .css strong {
color:#AF0038;
}
.entry .css code strong {
color:#4F4F4F;
}
.entry .css code em, entry .xhtml code em {
text-transform:none;
font:inherit;
color:#FF6FB8;
}
.entry .xhtml code strong {
color:#1DA4EF;
}
.entry .xhtml code em {
color:#FFB93F;
}
.entry .xhtml code tt {
color:#3F61FF;
font-weight:normal;
}
And here is the markup for the CSS example:
class=
"css">
/*Center Content Depending on screen size/resolution*/
#container {
position
:relative;
width:800px;
margin:0 auto;
}
/* LOGO, Searchbox, Product Links*/
#header {
float
:left;
width:800px;
clear:both;
background:url(images/top-border.gif)
bottom left no-repeat;
padding-bottom:25px;
}
#header h1#logo {
float
:left;
width:195px;
height:65px;
}
Not too bad right? We lose all the cluttery span
classes,
and inline styles.
Some things to remember when using this process:
1. To have the comments styled and avoid using a span, what I have done is left comments outside of the
tags and wrap them in a em. So if you have a comment in the middle of your code sample you will need to end the
before the comment and restart it after.
2. If you have code samples that have long lines of code, either make sure you make a line return to shorten the width and drop it to the next line OR set a width in the CSS for the s that surround the sample to your max width, and set the overflow property to scroll.
I’ve created two different samples for you to check out. Feel free to download (right click “save as”) the pages and use the styles as you wish! Also, this isn’t just limited to CSS and XHTML, you can easily do this with PHP, ASP, Javacript – you name it.
CSS girl sample (the styles I’ve used here) | Dark theme
Posted on 16th May 2008 by Lindsey in internet |Uncategorized
ajax, Articles, bc, Blogging, Blogs, buddypress, canada, cheap, CMS, dialup, discounts, drupal, gadget, hosting, html, inexpensive, islandnet.com, joomla, mysql, news, Other, perl, php, programming, python, reliable, rewards, seo, unlimited databases, unlimited email, v4, v5, victoria, wordpress, wp, writing, xoops
Anyone who blogs consistently knows how hard it is to come up with fresh content all the time. And when you do, it can take hours and hours to perfect that article before it’s ready to go live.
Say you work on a post relentlessly for two or three hours one day, and a few days later you go back, make your final edits and set it up to publish next Monday. And then the Friday before you see that someone else has gone and posted their spin on the exact same idea that you worked SO hard on.
You run into a fork in the road – do I publish my article as is no amendments? Do I delete it and cry over the hours of hard work? If I publish it are people going to think that I saw XYZ’s blog post and copied the idea? Do I include a link to XYZ’s post to show camaraderie?
I’ll be honest, when I have experienced this (and it happens at least once every other week to me!) I get so angry at myself. I kick myself when I’m down. I scold myself and question why didn’t I just post it when I first had the idea. Why did I put SO much work into it, and not publish right away. Than I usually sit on the post for a few weeks before I put it live, unless I think it’s really, really good and want feedback and to share it right away. A few times I have gone back and reworked the post to be a little bit different that what XYZ published and often included a link or reference to XYZ’s post as well.
What would you do?
Posted on 8th May 2008 by Vinh Le in internet |Uncategorized
ajax, bc, blog design, Blogs, buddypress, canada, cheap, CMS, dialup, discounts, drupal, gadget, hosting, html, inexpensive, islandnet.com, joomla, mysql, news, perl, php, programming, python, reliable, rewards, seo, unlimited databases, unlimited email, usability, v4, v5, victoria, weblogs, wordpress, wp, xoops

Even people who have no idea about usability feel the need to write articles about it to tell other people what they themselves should be doing. Usability has become a hot topic and everyone wants a piece of it by writing their own list of guidelines. Most of which end up just repeating what the other guy said. Yet even with the endless amount of articles on usability, there are still a lot of web designs that overlook easy ways to improve the usability of their design.
While there are many worthwhile guidelines to follow about usability, it really boils down to only two rule of thumbs. Those two are to make it easy to read and make it easy to find stuff. No matter what you do with your design, as long as you follow those two rule of thumbs then your design will be usable. Don’t stop there though and be satisfied. Take it to the next step and make it as aesthetic as possible and make it better all while still making sure your design follows the two guidelines.
Make it easy to read
1. Keep distractions to a minimal. This is especially important in the content area as that is where your readers will spend most of their time when they are on your blog. But that doesn’t mean you should neglect taking out anything in other areas that doesn’t really serve a purpose in your blog design as well.
2. Build a hierarchy that establishes a flow where there is less emphasis as it goes down in the list. For example, headings should pop more than links and bold texts. The sidebar should be capable of attracting attention, but not too much that it overpowers the content. You get the idea.
3. Keep the design of each area consistent. This lets the reader know that they are reading information that are closely related to each other due to their similarity. This also lets people block off different areas in their mind that they don’t need at the moment so they can focus on reading a specific section without their eyes wandering around trying to figure where a specific area begins or ends.
Make it easy to find stuff
1. Identify what people are looking for or what you want them to find. Then make it ridiculously easy to find if it is that important to you or them. Don’t just have one pathway/entry for a reader to be able to find it. Make multiple pathways/entries to it so if they miss one there are other ways for them to find the important stuff.
For example, if getting more subscribers is important to you then make a rss button that pops, ask people to sign up at the bottom of a post and make a cool design so people will see it, and create a special subscribe page.
2. Take away anything unimportant and be ruthless about it. So what makes something important or unimportant anyways? In blog design, if you take away something and it decreases your blog’s ability to achieve your goal whatever that may be, then that something would be pretty important.
But if you take it out and it doesn’t hurt your blog’s performance, then by all means rip the sucker out. It will improve your blog design by decreasing the amount of unimportant stuff that can get in the way of a reader who should be looking at your most important stuff.
3. Label everything or at least make it clear what they are looking at. Don’t assume that people will be able to tell what they are looking at or that they will draw the same conclusion as you. A thousand people can look at the same thing and come up with different descriptions of what they saw so save them the trouble and just tell them what it is.
Conclusion
Don’t stop at following these two guidelines and being satisfied. Take your blog design to the next level by making it better.
Subscribe today by RSS for free and get more tips on improving your blog design. If you don’t know about rss feeds or you want to use the email subscription option, read this page on subscribing to Blog Design Blog.
References
1. First photo from Andre flickr.
Hire me!
Hi, my name is Vinh Le. Thanks for reading my article. If you are interested in the blog design services that I offer, please check out my services page.
Related posts:
-
5 Ways to Make Your Blog Design Unforgettable Introduction A big problem with blogs these days is…
-
The Secret of Great Blog Designs What is the purpose of a blog design? There are…
-
How to Design for Ads in Blog Design Introduction Anyone who has been reading blogs for than…