Web Hosting Forums

Results 1 to 10 of 10

This is a discussion on Tricking IE6 in the Hosting Talk & Chit-chat forum
Hey guys... I need to 'trick' Internet Explorer 6. I have a site that uses CMSMadeSimple and I got it all setup and when I ...

  1. #1
    I didn't do it! Daniel_DBS's Avatar
    Join Date
    Aug 2007
    Location
    Mars
    Posts
    1,196

    Tricking IE6

    Hey guys...

    I need to 'trick' Internet Explorer 6. I have a site that uses CMSMadeSimple and I got it all setup and when I checked it on IE6, I had a problem. For some reason, it is throwing everything off alignment because the text size is showing up as HUGE on the page! Now if you change the IE text size attribute to smallest instead of the default medium, it looks great! In Firefox it is fine! No adjustments necessary...

    Funny thing is, this only happens in IE6, not in IE7!

    So how can I 'trick' IE6 into using the smallest text size attribute instead of the default medium???

    Not sure if it's possible but I hope it is!

    -Daniel
    -Daniel

    If the automobile had followed the same development cycle as the computer, a Rolls-Royce today would cost $100, get a million miles to the gallon, and explode once every few weeks.

    My scripts never have bugs. They just develop random features.

  2. #2
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    5,884
    In your document head, after all of your other CSS, use:
    Code:
    <!--[if IE 6]>
    <style type="text/css">
    * {font-size: small;}
    </style>
    <![endif]-->
    or
    Code:
    <!--[if IE 6]>
    <link type="text/css" rel="stylesheet" href="ie6.css" />
    <![endif]-->
    They are called conditional comments and they work with any IE version 5 or greater. They can be great for fixing all of inconsistencies in IE's CSS rendering without having to rely on CSS hacks that can often break. Other browsers see the entire chunk as a comment and ignore it .(HTML comments begin with<!-- and end with -->. You will notice that the conditional comments follow this format.)

    Do a search on conditional comments and you'll find lots of info.

    Note: in my first example, I set thefont-size for everything on the page to small--probably not what you want. Adjust to suit your needs. Remember, what you put there will complement what you've previously specified, so you only need to set options you want to change.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  3. #3
    I didn't do it! Daniel_DBS's Avatar
    Join Date
    Aug 2007
    Location
    Mars
    Posts
    1,196
    Thanks Jason...

    I am going to go try it and see if it works.

    -Daniel
    -Daniel

    If the automobile had followed the same development cycle as the computer, a Rolls-Royce today would cost $100, get a million miles to the gallon, and explode once every few weeks.

    My scripts never have bugs. They just develop random features.

  4. #4
    I didn't do it! Daniel_DBS's Avatar
    Join Date
    Aug 2007
    Location
    Mars
    Posts
    1,196
    Well Jason,

    That caused a Smarty Error!

    string(127) "Smarty error: [in template:23 line 23]: syntax error: unrecognized tag: font-size: small; (Smarty_Compiler.class.php, line 446)" string(111) "Smarty error: [in template:23 line 23]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)"
    Gah I HATE IE 6!!!

    IE 7 renders it properly!

    I guess I have to go back and re-do a special css sheet just for IE6
    -Daniel

    If the automobile had followed the same development cycle as the computer, a Rolls-Royce today would cost $100, get a million miles to the gallon, and explode once every few weeks.

    My scripts never have bugs. They just develop random features.

  5. #5
    I didn't do it! Daniel_DBS's Avatar
    Join Date
    Aug 2007
    Location
    Mars
    Posts
    1,196
    Ok now that is just WIERD!

    The smarty error only occurs on the homepage and it still misrenders it! If I go to a different page it renders properly and doesnt generate the error!
    -Daniel

    If the automobile had followed the same development cycle as the computer, a Rolls-Royce today would cost $100, get a million miles to the gallon, and explode once every few weeks.

    My scripts never have bugs. They just develop random features.

  6. #6
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    5,884
    In the Smarty template try wrapping the whole conditional comment thing in {literal}{/literal} which should block it from trying to parse that section. I'm not sure what in there Smarty would be having a problem with, though...

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  7. #7
    I didn't do it! Daniel_DBS's Avatar
    Join Date
    Aug 2007
    Location
    Mars
    Posts
    1,196
    Ok soooo I solved the Smarty Error... BUT it still is not working! I am calling it from an external stylesheet, but no matter what it isnt rendering properly in IE
    -Daniel

    If the automobile had followed the same development cycle as the computer, a Rolls-Royce today would cost $100, get a million miles to the gallon, and explode once every few weeks.

    My scripts never have bugs. They just develop random features.

  8. #8
    I didn't do it! Daniel_DBS's Avatar
    Join Date
    Aug 2007
    Location
    Mars
    Posts
    1,196
    Quote Originally Posted by jason View Post
    In the Smarty template try wrapping the whole conditional comment thing in {literal}{/literal} which should block it from trying to parse that section. I'm not sure what in there Smarty would be having a problem with, though...

    --Jason
    Ahhh... yes I forgot about the literal tags...

    What smarty didn't like was the {} around the CSS! It made it look like a smarty tag instead of CSS...
    -Daniel

    If the automobile had followed the same development cycle as the computer, a Rolls-Royce today would cost $100, get a million miles to the gallon, and explode once every few weeks.

    My scripts never have bugs. They just develop random features.

  9. #9
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,570
    Due to the cascading nature of CSS, the rule you added will be overridden by any more specific rule that sets a specific text size. You'll have to go over your CSS and make sure it sets only relative sizes, or override all absolute text size settings inside the conditional comment.

    BTW: why is Smarty parsing your CSS? I don't know this particular CMS, but that doesn't sound MadeSimple to me . Dynamic CSS is rarely an advantage.
    Regards,

    Wim Heemskerk
    ---
    Visit MeCCG.net - Cardgaming in J.R.R. Tolkien's Middle-earth
    And Gwaihir.net - The Middle-earth CCG store

  10. #10
    I didn't do it! Daniel_DBS's Avatar
    Join Date
    Aug 2007
    Location
    Mars
    Posts
    1,196
    Smarty doesnt parse your CSS if you put it in an external stylesheet or put {literal} tags around it. Since Smarty uses {} to identify template objects, without the {literal} tag or external stylesheet, it will try and parse it...

    i HATE internet exploder, ahem i mean explorer, i wish everyone used Firefox! I am going to have to go back and rewrite the CSS when I have the patience
    -Daniel

    If the automobile had followed the same development cycle as the computer, a Rolls-Royce today would cost $100, get a million miles to the gallon, and explode once every few weeks.

    My scripts never have bugs. They just develop random features.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •