Author Archives: Kevin Cupp

Dreamweaver Fails Conditional Comments

Comments (2)

If you create Dreamweaver templates for yourself or clients and have pages in multiple subdirectories, you’ll notice Dreamweaver fails to update the relative path to the IE stylesheets if you use conditional comments for them. Because they’re comments, Dreamweaver ignores them. Luckily, Dreamweaver has a plethora of parameters to get around almost any problem, so […]

Conditional Comments Fix IE Bugs

Comments (2)

As pointed out in some earlier comments, there’s a great way to fix IE bugs without hacks or relying on one browser bug to solve another one. I present to you conditional comments.

<!–[if IE 6]><link rel=”stylesheet” href=”stylesheets/ie6.css” type=”text/css” media=”all” /><![endif]–>

Yes, you read that correctly. If the browser is IE6, apply these styles. It’s that simple.
Other […]

CSS Specificity

Comments (1)

I had never heard of CSS specificity until I started my new job as a web developer, and let me tell you, it’s quite interesting. Now tell me, which style do you think would win if they are printed in this order in the style sheet?

a#a-02 { background-image : url(n.gif); }
a[id=”a-02″] { background-image : url(n.png); […]

Double-Margin Bug in IE6

Comments (18)

I always forget about this bug and end up being puzzled as to why the spacing on my page is all wrong, so remember this! This bug happens when you have a floated element with a margin defined in the same direction of the float. For example:
#sidebar {
float: left;
[…]

Attach Icons to Links Automatically

Comments (27)

Let your readers know before they click a link and it opens up some large application like Acrobat, Word, Excel, or Quicktime.

The HTML for the above link has no styles attached to it:
<a href=”news/issue12.pdf”>View Latest Issue</a>
The trick is all in the CSS:
a[href $=’.pdf’] {
padding-right: 18px;
background: transparent url(icon_pdf.gif) no-repeat center right;
}
Now when you link […]

Style Everything at Once

Comments (1)

Have a common property in the majority of your elements? Just style everything the same way with an astrisk:
* { margin: 0; padding: 0; }
For this example, now you only need to set margin and padding where you actually need some! The Universal Selector’s convenience doesn’t stop there, check out Eric Meyer’s post to learn […]

vpn service