Acquia
Aloha shirt
Cologne
CSS
DAMP
documentation
Drupal
DrupalCon
flowers
getting on with it
Hawaii
Hawaiian shirt
help
hibiscus
horn
Köln
music
neighbors
New Zealand
nicelobster
nice lobster
preparation
pride
puberty
recording industry
rehearsal
screencast
shirt o' the day
Sigismund von Neukomm
solo
spreading panic
success
theming
willpower
wisdom
CSS reset and Fonts + CSS and Internet Explorer
A couple of questions came up in our users group get together last night and I thought I should probably post the answers here again for everyone to see.
Resetting to clean CSS values and cross-browser, re-sizable fonts
If you include two of the CSS stylesheets so kindly provided by the
The IE conditional comment
I'm hoping this next one will begin to go away with the death of IE 6:
"Internet Explorer 6 is messing up my layout, what can I do?"
... While building countless extra billing hours into IE over the years, and causing premature baldness among website themers (due to tearing out of hair) ... that is, making a browser with its own, very non-standard ideas about the box model, font sizes, and so on ... the IE team did a really smart thing! You can tell any version of IE from 5 onwards to either pay attention to code that no other browsers can see OR ignore code that all other browsers will see and execute.
IE from version 5 onwards will look inside standard HTML comment tags: <!-- comment here --> for a couple of its own special codes. If it finds them it will act upon them while all other browsers will ignore the contents of the comment.
Here are the ones I find most useful:
<!--[if IE]-->
internet explorer will execute this code
<!--[endif]-->
<!--[if IE 6]-->
internet explorer 6 will execute this code
<!--[endif]-->
<!--[if IE 7]-->
internet explorer 7 will execute this code
<!--[endif]-->
This will work with any specific version of IE from 5 onwards (5.5 and other decimals also allowed)
lt = less than operator
<!--[if lt IE 7]-->
internet explorer lower than version 7 will execute this code
<!--[endif]-->
gt = greater than operator
<!--[if gt IE 5.5]-->
internet explorer 6 or higher will execute this code-->
<!--[endif]-->
There are also the gte (greater than or equal to) and the lte (less than or equal to) operators available.
The other very interesting operator to me is the NOT operator: !
<!--[if !IE]>-->
internet explorer will ignore this code
<!--<[endif]-->
This discussion on Drupal.org also discusses this issue: http://drupal.org/node/134569
In the end, my Drupal template header looks something like this:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css" media="all">@import "
<?php print $base_path.$directory;?>/reset.css";</style>
<?php print $base_path.$directory;?>/fonts.css";</style>
<?php print $styles ?>
<!--[if IE 7]>
<style type="text/css" media="all">@import "<?php print base_path.$directory;?>/ie-7.css";</style>
<![endif]-->
<!--[if IE 6]>
<style type="text/css" media="all">@import "<?php print $base_path.$directory;?>/ie-6.css";</style>
<![endif]-->
<?php print $scripts ?>
<?php print $head ?>
<title><?php print $head_title ?></title>
</head>


Comments
website design cumbria -
website design cumbria - Search Marketing solutions to UK businesses looking to promote their websites on the internet and through the search engines.
I've greatly been benefited
I've greatly been benefited by the article on css reset and fonts plus css and internet explorer. It is a valuable information. thanks.
I also think in the same way
I also think in the same way as it is that the YUI site has good documentation, and you need to read it to be in control of font sizes well in your layout work. It is an exciting information. thanks.
Every student would be glad
Every student would be glad to learn this valuable lesson on this subject - CSS reset and fonts in internet explorer. Personally, I've been benefited immensely by the discussion. keep posting.
I've been blessed with the
I've been blessed with the useful and valuable features - css reset and fonts css and internet explorer. This tutorial with examples, quizzes, references, and an editor is very helpful for a learner. Thanks.
I've found the whole lesson
I've found the whole lesson on CSS reset and Fonts + CSS and Internet Explorer to be very comprehensible and valuable discussion. I appreciate the detailed tutorial. Thanks for the informative and discursive post.
I am interested to learn
I am interested to learn about the solutions to some of the most common HTML/CSS bugs in internet Explorer, covers margins appearing larger, minimum height, and tag fixes. I've found the article very useful in this regard. keep posting. product design
I think it is a resourceful
I think it is a resourceful article on CSS reset and fonts, CSS and internet explorer. It is a valuable lesson on the topic. I've found the discussion very rewarding. keep posting.
It is very useful post to
It is very useful post to delve deep in to the css reset and fonts + css and internet explorer. I've greatly benefited by the discussion in this regard. Thanks for the nice tutorial. Personal Bankruptcy
I appreciate the post for its
I appreciate the post for its instructive and useful information. It is worth reading for its content too. I appreciate the hard work.
I personally use margins
I personally use margins because it does not collapse and it is semantically correct as well. Padding is like extending the boundaries of the container, while margin refers to an empty gap, or a boundary outside of the container. In text containers like headings and paragraphs, this is equivalent to an empty line break.zero friction fat loss diet
The article is really
The article is really awesome, and I got lots of valuable information from the article, it’s really very helpful for the visitorsoffice cleaning service
Need an extra push
This article is a must for SEOs and the app engine specialists. But what I find is it is too brief to be understood by all. So kindly be ellaborative in forth-coming articles so that newbies will take interest.
Wheat Grinder
Is there a way to explain
Is there a way to explain this a little more simply?
best blogging host
Post new comment