Web Design with HTML and CSS

(National Geographic (Little) Kids) #1
Tools to identify browser problems

Lesson 9, Browser Compatibility 205

Conditional Comment Operators


Conditional Comment operators can be complicated, but you are only likely to use them when
you have a high priority need to target specifi c versions of Internet Explorer.

Operator Description

IE represents Internet Explorer; if a number value is also specifirepresents the browser version ed, it

lt less than
lte less than or equal to
gt greater than
gte greater than or equal to
! the NOT operator
() subexpression operator
& the AND operator
| the OR operator
true evaluates to true
false evaluates to false

Addressing Internet Explorer 6 issues with JavaScript


Addressing the numerous layout issues likely to appear in your page designs is impossible and
it is beyond the scope of this lesson, but there are a few recurring issues that we can address in
regards to Internet Explorer 6. Conditional comments are not the only solution. For example,
there is a well-known bug in Internet Explorer 6 with transparency fi les in the PNG format.


This image was saved in the PNG fi le format and has transparent areas (the area to the left
and right of the rounded corners and in the bottom half of the gradient). This eff ect allows
you to change the background color of any page element the button is placed on to let the
background color show.


Internet Explorer 6 does not support the transparency, so you would see a solid color in the
transparent areas.

Free download pdf