Feb
24
2010
ilz

So often I’ll be working on a website that somebody else coded and have to strip out junk styling. There are a lot of different ways to accomplish the same thing with CSS, but so many people have no idea how much time they are wasting by coding something in a “hacky” manner.
Example.
I was working on a site the other day and noticed that every single paragraph in the main content area of every page of the site had a class of “first-paragraph” on it. So I looked in the external sheet and saw that this was simply to remove the top margin on the first paragraph on every page. Ok, so that method worked..great. Except that manually adding a class to every paragraph tag is such a waste of time. Check out the demo where I show an example of targeting the first paragraph in a content area without adding any classes or IDs paragraph tag in the XHTML. Then keep reading to see how to properly code the example above.
View Demo
Continue reading
no comments | tags: CSS | posted in CSS, Code Snippets
Dec
26
2009
ilz

Popups suck.
The good thing is you don’t see that many of them any more. That’s because browsers recognize that they suck and are most likely spam or ads and so they block the popups. The old way of creating a popup was to force open a new browser window over the current browser window. So this is what browsers block. But what if you actually have a need to use a popup window for something useful and not spammy? This happened to me the other day. A client wanted a popup window on their homepage to wish everyone a Merry Christmas.
Knowing I couldn’t use the old popup method, I went searching. I knew it’d be easy enough to use CSS to put a floating div over the content of the site, which creates a popup effect. The problem was how do you close the popup once it’s open? Javascript would be needed for this. Check out the demo I setup which shows how the CSS popup can be set to open on pageload or by clicking on a link; and then how Javascript allows you to have a “close” button that shuts or hides the popup. Then continue reading for the code and downloadable files.
View Demo
Continue reading
2 comments | tags: CSS, Javascript, Pop Up, Popup | posted in CSS, Code Snippets, Downloads, Web Design
Dec
8
2009
ilz

In a previous post I showed possibly the easiest way to embed a Twitter feed on your website. This brought up a couple of questions from some users.
1. Can you make a background behind individual Tweets?
2. Can you put the date on it’s own separate line?
As the case goes with a lot of things these days jQuery to the rescue! Check out the demo to see both of these things in action, and then continue reading to see how to accomplish these things with jQuery and download the source files.
View Demo Continue reading
1 comment | tags: CSS, Javascript, JQuery, Twit | posted in CSS, Code Snippets, Downloads, JQuery, Javascript
Nov
23
2009
ilz

I showed in a previous post how to use text-shadow with CSS3. Now it’s time to move on to something that’s just about as exciting, using Box-Shadow with CSS3. Throw it on a div, on a table, on an image.. anything goes! Of course it doesn’t work in every browser, but then again not much I talk about on this site does!
Check out the demo to see some examples and then keep reading to find out how to use Box-Shadow.
View Demo
Continue reading
8 comments | tags: Box-Shadow, CSS, CSS3 | posted in CSS, Code Snippets, Web Design
Nov
16
2009
ilz

Remember the old days when the only way to create a shadow on text was to make it an image? That’s good for search engines..right? Oh sure, just use some image replacement and then the search engines can read it. Not so easy for text edits in the future. Or for changing the color of the text or the background behind the text.
Fastforward to CSS3. Now we can define a shadow behind live text on a website. Wiggity whaaat? That’s right, simply with some good old CSS. Of course you’ll need to use a real browser, as of any other cool CSS technique, but I won’t even begin to go into that topic. So why is this so great?
- Search engines can read the text
- Easily change the color of the text
- Easily change the color, size, or blur of the shadow
- Easily change the background color or image behind the text
- Your friends will be like totally impressed
An example of this is the title to every article on this lil website of mine. Do you see the shadow behind the title “Using Text-Shadow with CSS3“? If you don’t for the love of god.. DOWNLOAD FIREFOX! Check out the demo for some more examples of text-shadow created with CSS3, and then continue reading to learn how to write the CSS.
View Demo
Continue reading
1 comment | tags: CSS, CSS3, Text-Shadow | posted in CSS, Code Snippets
Oct
29
2009
ilz

Ya.. I said “Web 2.0“.. what?
Well if you’re still here after that, here’s the deal. I was reading an interesting tutorial about creating a button similar to the one found on the Campaign Monitor website. I actually went ahead and created the button, I always love seeing the approach other designers take at creating things in Photoshop.
Well after I created it I figured I may as well put the PSD file up here for anyone that wants to use it. I’ll give the CSS code to add it to your website as a CSS sprite also. Now I need to give credit where credit is due. The CSS code, and the tutorial of how to make the button are from Jacob Gube over at Six Revisions. Check out that link if you want the step by step of how to make this button.
I’m really putting it up here so I’ll have easy access to the PSD file in the future so I can download it no-matter where I am, make a few color adjustments, copy the CSS code, and have a new button for whatever I’m working on that day. Check out the demo to see the button in action, and feel free to download the PSD file of my version of the button. Keep reading for the CSS code.
View Demo
Download PSD File
Continue reading
no comments | tags: CSS, Downloads, Freebies, Photoshop, Web 2.0 | posted in CSS, Code Snippets, Downloads, Freebies, Web Design
Oct
26
2009
ilz

Here’s another interesting thing you can do with your CSS to style your website. We’ve all selected text from a webpage with our cursor before right? But most likely you never put any thought into what the default background color of the text was when you were selecting it. That is unless the website has a blue background and you can’t see what you’re selecting because the default background color of text on selection is blue, causing it to blend in.
Lets get right to the example I set up so you can see what I’m talking about. Not only can you control the background color of the text when you select it with your cursor, but you can also change the color of the text itself on select.
View Demo
Continue reading
no comments | tags: CSS, Text Selection | posted in CSS, Code Snippets, Web Design
Oct
19
2009
ilz

Using an unordered list is a simple and easy to style method of creating a navigation bar. Now with CSS3 and round corners created by the browser, it’s even easier to make a nice and clean nav. I introduced CSS3’s border-radius in a previous post, located here.
Check out the example I created, and then keep reading to find out how to create the above nav with nothing more than some CSS.
View Demo
Continue reading
no comments | tags: CSS, CSS3 | posted in CSS, Tutorials, Web Design
Sep
27
2009
ilz
Recently released was a book by Dan Cederholm called Web Standards Solutions, The Markup and Style Handbook. This is the follow-up to an earlier version of the book. This brings up two questions.
1. Do you need this book if you have neither version?
2. If you do have the first version is it worth purchasing the new version?
Keep reading to find out.

Continue reading
no comments | tags: CSS, Semantic, Web Design, Web Standards, Web Standards Solutions, XHTML | posted in Book Review, CSS, Web Design
Sep
21
2009
ilz

On my portfolio website I have an About page, where I explain… who I am of course! So I have a picture of myself in the sidebar, but got the idea that it’d be nice to have the picture change randomly on page load. I looked around at a few different options. Some were Javascript, some were PHP. It wasn’t worth turning the page into a PHP page just for this effect, so I went with Javascript. There are a lot of different options, but here’s the one I went with.
Continue reading
6 comments | tags: CSS, Javascript, load random image | posted in Code Snippets, Javascript, Tutorials, Web Design
Sep
19
2009
ilz

Here’s an interesting way to add a CSS stylesheet switcher to your website. I’ve used stylesheet switchers in the past, but this one is different. In the past I had a button to press, which in turn switched the stylesheet of the page. This one switches the sheet at a certain time of day, which I think is pretty cool. My website uses clouds in the header, so it was just begging for me to make a “night” version of the header which would automatically switch on at night.
Continue reading
1 comment | tags: CSS, Dreamweaver, Javascript, Kaosweaver | posted in CSS, Dreamweaver, Javascript, Tutorials, Web Design
Sep
14
2009
ilz
Here’s a problem I came across for the first time the other day. If you code CSS / XHTML, you most likely are familiar with the Superscript <sup></sup> and Subscript <sub></sub> tags. While coding a site I used the Superscript tag, but I noticed a problem when viewing the page in browsers. The problem was that by pushing the text above the line (Superscript), the spacing in between the lines (line-height) was uneven; the Superscript characters were pushing the line of text it was in further away from the line above it.
Example:
Here is an example of how browsers push the lines of text apart when you use a SuperscriptTM in your XHTML. Notice how the lines of text have different spacing between them. Keep reading to find out the solution to this problem.
Continue reading
no comments | tags: CSS, Web Design, XHTML | posted in CSS, Tutorials
Jul
16
2009
ilz

I’m obsessed with CSS.
There I said it. I have just about every CSS book that has received good reviews. As a freelance website designer I try to make time in between projects to read these books, pick up new tricks, and brush up on what I already know or may have forgotten. If the book is worthy I throw some bookmarks on important sections, so I can easily use it as a reference in the future.
As I finish these books I will be giving my honest reviews, be it negative or positive. Hopefully this will help you decide if the book is a good choice for you to purchase.
Continue reading for my review of CSS Mastery; Advanced Web Standards Solutions by Andy Budd. ©2006
Continue reading
1 comment | tags: Andy Budd, Book Review, CSS, Dan Cederholm, Web Design, Web Standards | posted in Book Review, CSS, Dreamweaver, Reviews, Web Design
Recent Comments