Archive for the ‘Internet Explorer’ Category

By default IE have a vertical scrollbar on textareas, even if the length of the page does not require a vertical scrollbar. To hide the vertical scrollbar when the scrollbar is disabled just add the following CSS code in your stylesheet.

textarea {
overflow: auto;
}

Conditional comments only work in Internet Explorer. Their basic structure is the same as an HTML comment <!– –>. Therefore all other browsers will see them as normal comments and will ignore them entirely.

Internet Explorer recognizes <!–[if IE]> syntax and resolves the if and parses the content of the conditional comment as if it were normal page content.

Since conditional comments use the HTML comment structure, they can only be included in HTML files, and not in CSS files, but you can put a <link> tag in the conditional comment referring to an extra style sheet created for IE only.

Syntax examples:
<!–[if IE 6]> Welcome to Internet Explorer 6 <![endif]–>
<!–[if IE 7]> Welcome to Internet Explorer 7 <![endif]–>
<!–[if IE 8]> Welcome to Internet Explorer 8 <![endif]–>

Did you find that Internet Explorer 6 displays a solid black border when you use border-color: transparent. Fortunately, it works fine with other browsers. This can easily be fixed even if you're a beginner when it comes to IE6 hacks.

.classname /* e.g. Internet Explorer 7, FireFox, Opera and Safari */
{
border: solid 5px transparent;
}

Consider the following extra lines of CSS code and problem solved!

*html .classname /* IE6 fix */
{
border-color: pink;
filter: chroma(color=pink);
}

PNG popularity has mostly been held back by Internet Explore’s lack of support for Alpha Transparency in IE6 and below. With IE7, PNG support isn’t perfect but it’s suitable for most cases. With little search you will find various examples with complex CSS, scripts, Microsoft filter to force transparency, but would that help you if you don’t have the time for all that fuss!

The closest and easy way to solve this problem when working with small icons (16×16) is Fireworks Animated Gif. Open your PNG image in Fireworks and export it as an Animated Gif with Alpha Transparency and that nasty solid grey background in IE6 will disappear!

You can also use a filter which overrides the CSS:
* html #image-style {background-image: none; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=”filename.png”, sizingMethod=”scale”);}