#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Location
    Oslo, Norway
    Posts
    24
    Rep Power
    0

    Problem with CSS in older IE versions


    I run http://www.licklinux.com and the site has been designed to fit most browsers. Such as Gecko (e.g. Firefox), IE, Opera, even Lynx e.t.c.

    Though in older versions of IE, the sidebar has an awfully ugly blank right-margin. I can't seem to fix this problem, and by viewing my stats 17% use these non-compatible browsers. Can someone please help me? I usually figure CSS problems out myself, but now I'm totally lost...
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Posts
    15
    Rep Power
    0
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Location
    Oslo, Norway
    Posts
    24
    Rep Power
    0
    <?php location ?> takes you where you need to be... licklinux.com will work fine
  6. #4
  7. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,124
    Rep Power
    4309
    It would help if you could show us a screenshot of that page in an "older version of IE".
    Spreading knowledge, one newbie at a time.

    Learn CSS. | PHP includes | HTML Validator | CSS validator

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Location
    Oslo, Norway
    Posts
    24
    Rep Power
    0
    I'll do it tomorrow since the older computers at my school use it...
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Location
    Oslo, Norway
    Posts
    24
    Rep Power
    0
    Here's the screenshot (attached)
    Attached Images
  12. #7
  13. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,124
    Rep Power
    4309
    Your pages say that they are valid HTML. They are not. There are a few errors.

    You should use some kind of CSS hack. I recommend this one. It will allow you to compensate for IE5/Win's faulty box model.
    The top value is for IE5/Win and the one under it with a backslash in the name is for IE6/Win.
    Code:
    /* hide from IE5mac &#92;*/
    * html selectors {
    	width: 364px;
    	wid\th: 344px;
    }
    /* end hide */

    Comments on this post

    • kk5st agrees
    Last edited by Kravvitz; January 29th, 2005 at 01:53 PM.
    Spreading knowledge, one newbie at a time.

    Learn CSS. | PHP includes | HTML Validator | CSS validator

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Location
    Oslo, Norway
    Posts
    24
    Rep Power
    0
    Thanks a lot! But how do i use this hack? Where should it be placed?
  16. #9
  17. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,124
    Rep Power
    4309
    In your CSS file after what ever rules you need to give special values for IE5+/Win.

    For example...
    Code:
    div.box {
    	width: 120px;
    	padding: 10px
    }
    div.box2 {
    	width: 120px;
    	padding: 10px
    	height: 50px;
    }
    /* hide from IE5mac \*/
    * html div.box,* html div.box2 {
    	width: 140px;
    	wid\th: 120px;
    }
    * html div.box2 {
    	height: 70px;
    	hei\ght: 50px;
    }
    /* end hide */
    Last edited by Kravvitz; January 29th, 2005 at 01:53 PM.
    Spreading knowledge, one newbie at a time.

    Learn CSS. | PHP includes | HTML Validator | CSS validator

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  18. #10
  19. Thanks Johnny Hart (BC) R.I.P.

    Join Date
    May 2003
    Location
    Dallas
    Posts
    5,262
    Rep Power
    1960
    Originally Posted by kravvitz
    I just noticed that the forum removed the backslash from my code. So you should replace [backslash] with an actual backslash.
    To get this;
    Code:
    /* hide from IE5mac &#92;*/
    do this

    &#38;#92;*/

    cheers,

    gary
    Last edited by kk5st; January 29th, 2005 at 01:33 PM.
    There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

    My html and css workshop, demos and tutorials.
    Ask a better question, get a better answer.
  20. #11
  21. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,124
    Rep Power
    4309
    Thanks gary, I forgot to try character entity.
    Spreading knowledge, one newbie at a time.

    Learn CSS. | PHP includes | HTML Validator | CSS validator

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).

IMN logo majestic logo threadwatch logo seochat tools logo