Blogs about css:
Webmonkey is Back.
0 comment(s).
Permalink
Naked, Not Broken.
No, fair reader, my website is not broken. It's appearing exactly as I mean it to. For today is CSS Naked Day, where super-geeky websites all over the tubes throw off their styling and unabashedly reveal their content to you.
Also, I've released a lovely new tutorial in my articles that will walk you through creating a fancy content box using CSS and images. Ta ta!
0 comment(s).
Permalink
Fancy HRs with CSS.
Lest you think that this blog is only about regular human activities, I present you with a CSS method for using graphics as your hr. My apologies to the regular humans.
Suppose you've got a lovely little graphic that you'd like to use for an HR in place of the boring old default straight line in most browsers. How do you implement your new graphic in a consistent and semantic method?
It's relatively simple to style a fancy HR in most browsers, including IE7:
<style type="text/css">
hr.fancy
{ background: url(images/hr.gif) center center no-repeat;
height: 20px;
border: none;
margin: 2em 7em;
}
</style>
Here are the results:
Let us also speak of the 800 pound gorilla in the room. Internet Explorer 6, and presumably lower versions, will not display this correctly without assistance. You will need to add the following dandy patch by Borgar.
<!--[if lte IE 6]>
hr.fancy
{ display: list-item;
list-style: url(images/hr.gif) inside;
filter: alpha(opacity=0);
width: 0;
}
</style>
<![endif]-->
0 comment(s).
Permalink
Classy Links.
This is a pretty simple bit of code, but I though it might come in handy as it was something I hadn't covered yet. Here is one method of using CSS to apply a different appearance to some of your links using CSS.
<style type="text/css">
a.alternate { color: #FFFF99; }
a.alternate:visited { color: #CCCCFF }
a.alternate:hover { color: #6699FF; }
a.alternate:active { color: #990033; }
</style>
<a href="#" class="alternate">Alternatly styled link</a>
This is a regular link. Only this middle link will have a non-standard style. This is another regular link.
The above method uses a class (the ".alternate" part) combined with the psuedo-class selectors (the ":hover" part) that are used in links. Alternately, you could group the links inside an element with an id or a class, and select them as shown in the following code.
<style type="text/css">
#nav a { color: #FFFF99; }
#nav a:visited { color: #CCCCFF }
#nav a:hover { color: #6699FF; }
#nav a:active { color: #990033; }
</style>
<div id="nav">
<a href="#">Alternately styled link</a>
<a href="#">Alternately styled link</a>
<a href="#">Alternately styled link</a>
</div>
Once you've selected your links, you can add any style declarations that you wish. I've specified only the foreground color (the text color of the link) here for simplicity.
Just remember to use specify your link declarations in the following order:
- Plain Ole Link
- Visited
- Hover
- Active
This order will ensure that the cascading styles for links are displayed as as you expect them to.
0 comment(s).
Permalink
It's Difficult.
Learning to build websites using standards based, accessible X/HTML and CSS is like learning to drive a manual transmission hovercar. It is quite difficult if you're coming from a table based design philosophy. It's floaty, and mysterious, and nothing behaves quite like it should. But doing so really is worthwhile - even Newsweek thinks so. (Supposedly, they did an interview with famous web-guy Jeffrey Zeldman, but I can't find the article online.)
In other news, we have LOLed our cats. Just a little bit. Please don't call the ASPCA.

0 comment(s).
Permalink
Remaining blogs about css:
- Clearfix (with an IE7 solution). — 8.21.2007
- A CSS Styled Form. — 7.18.2007
- FireFox Lover. — 6.13.2007
- Equal Height Columns. — 5.27.2007
- IE and .PNGS - Fini. — 5.7.2007
- IE and .PNGs Continued. — 5.4.2007
- IE and the AlphaImageLoader for .PNGs. — 4.30.2007
- Nudity & Distractions. — 4.5.2007
- Weekend Fun. — 3.4.2007
- CSS Milkshake. — 2.7.2007
- Crazy Dutchman. — 1.27.2007
- It's called "Pro Bono". — 1.24.2007
- Wii The Eff? — 1.23.2007
- Goomba Code. — 1.9.2007
- Internet News. — 9.13.2006
- Blah Blah Blah CSS. — 8.29.2006
- My Brain Hurts. — 8.10.2006
- Dan Cedarholm - Genius. — 8.2.2006
- Happy Happy. — 6.28.2006