
January 29th, 2013, 04:58 AM
|
 |
Contributing User
|
|
|
|
Quote: | Originally Posted by Kravvitz web_loone08, would you mind explaining why you decided to use 3 conditional comments? |
You can declare one standard css version without the conditional comments and then add your IE conditional comment styles or you can target specific versions of IE and/or all other browsers. It can be done both ways and you may comment about it using more memory or creating a larger file size; the way I have demonstrated it, but both would be minute. The way I set this up; the OP can target specific versions of IE and then specify how he/she would like it to display in all other browsers. Either way you define the comments (with or without a specified Non-IE Conditional Comment); is acceptable and accessible cross browser. Technically..., you would only need to use one set of conditional comments for IE6 or below; because IE6 and below do not support the CSS float property.
As a side note to your question; if you write the code, just as I have... with three conditional comments; IE6 will look like this; which is normal visual representation of what I was trying to accomplish:
Conformatively Imagined Display In IE6
Otherwise; if you were to declare one standard CSS version without the conditional comments and then add your IE conditional comment styles; you would get a non-normal visual representation of what I was trying to accomplish... hence the floating element would not display, as it was supposed to. You can view the end results below:
Non-Conformatively Imagined & Irregular Display In IE6
So... to answer your question... the reason for using three separate conditional comments; is that, in this instance, it is a necessary evil... to create accurate visual cross browser representation of a floating element.
Last edited by web_loone08 : January 29th, 2013 at 06:33 AM.
|