Category Archives: Hack

Styling select dropdown with Javascript replacement

Comments (0)

My main issue was the lack of control on the look of select dropdown, especially with IE if an option width is wider than the select initial width. Firefox deals with that issue by automatically increasing the list but unfortunately IE cuts off the text.

I’ve been using the Mootools Javascript library to automatically hide the […]

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 hack for Firefox only

Comments (10)

I have been in a few situations (very few) where I want a page to look different in Firefox. Here’s a little snippet of how you could code it. Please note that this CSS will not validate but will work perfectly fine.

/*”className” is your class or ID*/
/*FireFox 2 */
.className, x:-moz-any-link {font-weight:bold;}

/*FireFox 3*/
.className, x:-moz-any-link, x:default […]

Quick and easy IE hack for CSS

Comments (3169)

As you probably know, Internet Explorer has a bad habit of butchering CSS. While working on a project the other day, I came across a quick way to fix CSS that looks great in all browsers except for IE. If you weren’t aware (I wasn’t!), the underscore character preceding any property in a […]

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;
[…]

Easy PNG transparency for IE6

Comments (1)

In honor of Mager’s new transparancy-heavy (and f***ing sick) site redesign by Marc Mendell, here’s a quick and easy way to make png transparencies work in IE6.
So you have your background url set something like this and it looks awesome in all the real browsers:
#pngImage {
background: url(transparent-bg.png) no-repeat;
}
But in […]

<sup> tag in IE6

Comments (2)

What’s up with the <sup> tag? It’s a semantic way of marking up superscripts, but it acts funny in IE6 (are you surprised?).

You will notice here that the screenshot on the left looks a little cramped. Here is the fix:
sup {
text-align: vertical
}
If you want to move the number higher […]

vpn service