Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorapn85
    • CommentTimeSep 18th 2007
     permalink
    Hey all,

    I was hoping I could get some help with an IE hack. Here's my site: http://www.rocknclothing.com/store/test1.html

    If you're looking on Internet Explorer, you can see that the margins are completely messed up. Yet, it looks fine in Firefox and IE. If someone would please give me an IE hack I can use to fix this as I don't have a clue. Or am I just better off changing everything to absolute?

    thanks!
    • CommentAuthorpaul
    • CommentTimeSep 18th 2007
     permalink
    you van check your broewser and place seperate css accordingly to browser compatibility.

    use this check
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    function ExplorerRecognizer()
    {
    broweser = navigator.appName
    vrsn = navigator.userAgent
    store = vrsn.substring(30,33)
    stores = vrsn.substring(83,90)
    Ieversion = parseFloat(store)
    Mzlaversion = parseFloat(stores)
    if(Ieversion<=6)
    {
    document.getElementById('cs').href = 'includes/style_1.css'
    //alert("Version 6")
    return false
    }
    else if(Ieversion>6)
    {
    document.getElementById('cs').href = 'includes/style_2.css'
    //alert("Version 7")
    return false
    }
    else if(Mzlaversion<2)
    {
    document.getElementById('cs').href = 'includes/style_3.css'
    //alert("Mozilla Version 1.5")
    return false
    }
    else
    document.getElementById('cs').href = 'includes/style_3.css'
    //alert('Mozilla Version 2')
    return false
    }

    PAUL
    Thankful People: apn85
    •  
      CommentAuthorjernigani
    • CommentTimeSep 18th 2007
     permalink
    or...if you don't want to use javascript you can use IE commenting


    just put whatever styles will make the margins look correct for IE inside a style tag inside of your IE comment tag that you already have in there.(where you have the pngfix)

    and make sure it is after you main css, so that it overwrites your css.
    Thankful People: apn85
    • CommentAuthordavist11
    • CommentTimeSep 18th 2007
     permalink
    Uh no, do NOT use javascript to detect the browser and include a specific stylesheet. Use conditional comments to send any IE specific styles:

    <!--[if IE 6]>
    <link href="screen-ie6.css" type="text/css" rel="stylesheet" media="screen" />
    <![endif]-->
    Thankful People: apn85
    • CommentAuthorapn85
    • CommentTimeSep 18th 2007
     permalink
    thanks a lot guys!
Add your comments
    Username Password
  • Format comments as (Help)