
April 10th, 2008 by

debbie campbell
Bored with the plain old HTML divider? Try this quick tutorial and learn how to make more interesting horizontal rules.
Posted in CSS, CSS Tutorials, Web Design |
No Comments »

April 9th, 2008 by

debbie campbell
I wrote a blog post about this a while back but now I’m adding a full tutorial so you can actually see an example as it’s created. Learn how to turn any CSS background image into a clickable image map.
Try my tute and let me know what you think:
Clickable image maps example
I’ll be adding more CSS tutorials in the coming weeks, so check back every so often.
Posted in CSS, CSS Tutorials, Web Design |
No Comments »

March 24th, 2008 by

debbie campbell
I must admit that I’d never used IR on a site until today… my client wanted pretty H1 tags and Georgia wasn’t cutting it. So I did a little research and found that CSS-Discuss recommended the Gilder Levin Ryznar Jacoubsen (Version 1) technique to be one of the most accessibility-friendly; scroll down about 2/5 of the way to read more about this. Here’s the page with the technique spelled out for you.
This was super-easy to implement in both the HTML and CSS. It took me about 20 minutes to change 15 or so H1 headings to the new images and the client is now happy.
Posted in CSS |
No Comments »

February 5th, 2008 by

debbie campbell
I’ve tried various clunky fixes for the IE6 PNG transparency problem, but yesterday ran across a wonderful little script from Angus Turnbull (from 2005, but no matter).
I tried it yesterday on a CSS background image and it works like a charm, but ran into some problems today trying to use it on a floated image.
Here’s the thing: when using it for a background image, follow the directions under ‘Transparent Backgrounds’ here and it works perfectly. But when you use it for a foreground image, you have to have a blank .gif file on the server, and you have to edit one line in Angus’ .htc file to point to that blank .gif.
This info is not obvious at all and I was really confused until I read Angus’ page thoroughly. But after loading the blank .gif and editing the iepngfix.htc file, all was well.
This is one of the easier implementations of a PNG fix I’ve seen. It uses the ‘behavior’ property in CSS, a Microsoft-proprietary thing and won’t affect browsers that already support PNG’s correctly.

Posted in CSS, Cool Tools, Graphics, Web Design |
No Comments »

December 24th, 2007 by

debbie campbell
And another thing…
The boundaries of my PNG (the logo in this site-in-progress) overlap a few of the menu items in the navigation bar: Home, About Us, and the left side of Construction. I applied a z-index to that navbar thinking that might solve the problem but it didn’t.
Another developer pointed out that the navbar needed to have positioning before z-index will work. I applied a position: relative; to it, and voila! Works perfectly now.
Posted in CSS, Web Design |
No Comments »

December 11th, 2007 by

debbie campbell
NOTE: This post has been replaced by a full-fledged tutorial - you can find that here. Please go there and don’t try what you see here; Wordpress mangles my code snippets no matter how I try to get them displayed. The new tute is much better, I promise.
———————
This is a neat little trick that will allow you to create multiple clickable areas over any background image. This is easier, to me, than making image maps used to be.
Create a transparent box, absolutely positioned, that fits right over the top of the section of background image you want to make clickable. It’s easier to give this box a background-color while you’re getting it into position. The CSS looks like this:
/* This is the logo link clickable area */
#logo-zone {
position: absolute;
top: 18px;
left: 11px;
height: 21px;
width: 240px;
background-color: transparent;
}
Obviously you’ll change the ‘top’ and ‘left’ positions to line up with the top left corner of your background image’s clickable section, and adjust the ‘height’ and ‘width’ to fit.
Within the HTML, add an href link with the ID of your clickable box (Wordpress won’t let me put this next link in here without screwing it up - remove the x from xhref):
<a id=”logo-zone” xhref=”yourlink.com” >
Pretty simple, and you can create multiple clickable areas wherever you need them on your page.

Posted in CSS, Web Design |
12 Comments »

November 29th, 2007 by

debbie campbell
I’m on a mailing list with a group of professional women designers and developers. There’s lots of conversation flowing and it occasionally turns very lively - as it did yesterday when a member posted about her frustration with CSS and continuing attachment to tables. It ignited a veritable firestorm of commentary! It was fun to read, but it did help me clarify a few reasons that I love CSS and think it’s worth the time of any web professional to learn it. Note I didn’t say ‘master’ it, because I don’t think there are a whole lot of people that can do that, but learning? That’s one of the reasons I’m in this profession, because I like to be challenged.
Anyway here are five things that I think are major advantages of CSS over tables:
- You can put things where you want them. When I was using tables I used to get so frustrated with having to line things up under the cells above them and split cells into more tables and more cells just to get the layout to work the way I wanted it too. With CSS and absolute positioning, relative positioning and floats, I don’t have to think in advance how I’m going to slice up my design to fit - I can put elements where I want them to go. As a designer this was the key reason I switched to CSS in the first place.
- Shorter code. Now for a small page it doesn’t make a lot of difference as far as the length of code. But I worked on one client’s site (70+ pages) where every page was full of nested table after nested table after nested table. Cleaning up one of those pages - converting it from tables to CSS - often meant a reduction from 1,000 or more lines of code to 400 or less. Over the entire site, that’s a huge difference. The pages load faster, they take up less room on the server. Not a benefit for SEO, but certainly a big one for users with slower connections.
- Content first may be better for SEO. With tables, the page is read by the search engine in the order it appears in the code and presented that way on the page. But with CSS and positioning, I can put my big headline and block of content up near the top of the page and drop the navigation, header, sidebar and footer to the bottom. That means that Google gets to the meat of the page right away instead of wading through a lot of code.
- Easier maintenance. Having rewritten the aforementioned table-based site, I can tell you it can be a nightmare trying to keep track of multiple nested divs on a 1,000-line page. Once the site is converted to CSS, maintaining it (either yourself, your client or another web developer) is so much easier, faster, and cost-efficient.
- Better for your clients. I firmly believe that not providing a client with clean, well-written code is a big disservice. They’re paying you to be a professional and CSS is a professional’s tool (just one of them, but a key one). When you provide a client with a well-built site that allows them to change the entire look and feel of their website experience with just a little work, rather than a redesign, that’s huge.
I will now step off my little soapbox and slide it back under the table.
I know that learning CSS can be tough; I liked the challenge (one of the reasons I’m in this profession) but I certainly wouldn’t call it intuitive. However, taking the stand that one is not going to learn it because it’s just not that important, that I can’t understand at all.
Tables have their place, for display of tabular data, but they were not intended to be a layout device.

Posted in CSS, SEO, Site Redesign, Web Design |
6 Comments »

November 25th, 2007 by

debbie campbell
This morning I posted a link to a page I’m working on that has a tricky CSS problem on an excellent women-only mailing list hoping to get some pointers. I just got one, and it started with ‘You have a beautifully-organized CSS file.’
That’s one of the best compliments I’ve received and it’s especially cool coming from another developer that I consider to be of equal caliber. A nice thing to come home to after a few hours of surgical-strike shopping.
Posted in CSS, Web Design |
No Comments »