Phone and FAX
Tel: 0845 121 1194
Fax: 0845 121 1195
Archives:
Meta:
Categories:
Displaying HTML for Internet Explorer only - September 18th, 2008
There are many reasons why you would want to display pieces of code differently in IE. Im sure you know what I mean…
As most web designers will know, IE is not the the best to work with as it renders HTML slightly differently. There are many ways to work round this issue and this is one of them:
<code><!–[if IE]>
<i>Anything here will be displayed in Internet Explorer ONLY</i>
<![endif]—-></code>
The above code, when placed in your HTML code, will only show if using any version of Internet Explorer.
<code><!–[if !IE]–>
<i>Anything here will be displayed in any browser, other than Internet Explorer</i>
<!–[endif]–></code>
Like a lot of the major programming languages, have an exclamation mark indicates NOT.
<code><!–[if IE 6]>
<i>All code here will only show in IE6</i>
<![endif]—-></code>
The above will only view in IE6 - The most used browser at the time of writingg this. This code is very much needed.
You can also use the ‘!’ and change 6 to 5 and 7 (Maybe 8 also?) for the various versions of IE.
<code><!–[if gt IE 5]>
<i>Only viewable be browsers greater than IE5</i>
<![endif]—-></code>
As you would have guessed, gt stands for “Greater Than”. gt could be replaced by the following also:
lt - is less than
lte - is less than or equal to
gte - is greater than or equal to
IE8 fully CSS 2.1 Compliant - September 12th, 2008
Internet explorer 8 developers have announced that IE8 will be fully compliant to CSS 2.1 standards. This is great news for web designers as IE have always been one step behind when it came to implementing CSS. however if you want to use selectors in IE8 you will have to use the vendor specific tags. You may have seen if you have looked at CSS that some of the selectors might have, ms- or moz- before them. These are browser specific rules and IE8 will use this to fill in the gaps for the CSS 2.1. Its really refreshing to see that IE are really pushing the boat out with how standards compliant they are making the next browser and how much CSS they are implementing. The release of Google Chrome should also buck up the ideas of other browser makers and i would like to see a browser war with regards to them trying to implement CCS into the browsers.
There is also a nice list of CSS 3 features IE8 wil be able to implement including grid layouts which will be a great feature to be able to use. Again some of the CSS 3 features will have the vendor prefix attached in order to work. One comment on the IE blog that released this information was a call to IE to make the CSS engine separately up date-able from the actual browser itself and i think this is the way it should be. Currently if more CSS was to be implemented into the browser a new build of the browser is needed, If the CSS could be updated separately then it could be part of the windows update function and would give IE a massive benefit in how they could update so easily.
IE8 is in Beta 2 version at the moment so i would expect it to be available before the end of this year and ill be here anticipating everything we have read about it
Gary
Web Designer