October 10, 2008 – 8:26 pm
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 […]
October 8, 2008 – 5:38 pm
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); […]
June 17, 2008 – 9:43 am
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;
[…]
June 15, 2008 – 11:31 am
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 […]
June 12, 2008 – 10:54 am
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 […]
Dreamweaver Fails Conditional Comments
Comments (2) October 15, 2008 – 4:43 pmIf 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 […]