Archive for the ‘CSS’ Category

How to add specific style/script for IE in HTML?

Monday, May 15th, 2006

There are times when we want a specific style or stylesheet or a javascript to be rendered only in IE and not other browsers such as FireFox. If this is so, then you can do so by adding following if and endif declarations in the HTML. Insert the style or stylesheet or javascript that needs to be rendered only by IE between the if and endif declarations in the HTML.

<!- -[if IE]>

Style or Stylesheet or JavaScript that should be rendered by Internet Explorer (IE) only will come here.

<![endif]- ->

Image Flicker Problem in IE

Monday, May 8th, 2006

When you use CSS background images that are clickable, you must have come across image flicker problem in IE. It’s very annoying. So, hopefully here’s the solution that might work: http://dean.edwards.name/my/flicker.html.

I haven’t tried it but hopefully it works.

Min-Height

Sunday, May 7th, 2006

Majority of the web page layout require side navigation column and the content column to expand vertically equal. This can be a challenge when we prefer to use div rather than tables for layout.

I explained one of the most useful hacks that create an appearance of two columnar div’s expanding vertically equal to each other. However, there are times when we actually want both the columns to have equal height. The solution can be min-height – a very helpful CSS property. However, it doesn’t work in IE. It works in FireFox. (more…)

How to Use ems for HTML Font Size?

Monday, January 30th, 2006

HTML font size is specified in CSS stylesheet using pixels, ems or keywords. I have rarely found keywords much useful. Using pixel guarantees control over the look of the web page but the issue is that if we use pixels for font size, then the web page is not as accessible in IE.

For example, open this web page in IE and select “largest” for the text size under “View” menu as seen in the screenshot below:

How to Increase Font Size In IE

(more…)

How to Create Table With First Column Frozen?

Monday, December 12th, 2005

Here is a HTML technique that can be used to create a table for data such that we can freeze the first column and add a scrollbar for rest of the columns as illustrated below.

Heading
Heading
Heading
This is a long Heading
Heading
Heading
Heading
Heading
Heading
Heading
Heading
Heading
 
Heading Heading Heading Heading Heading Heading Heading Heading Heading
xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx

(more…)