css

z index in IE 6

problem:
overlap div in IE6, z index is not working correctly in IE6

solution:

  1. put the relative position in "wrapper" div
  2. for the overlaped div, put on absolute positions

css code example:
#wrapper{ position: relative; }
#box1 { position: absolute; top: 150px; left:60px;width: 200px; height: 200px; background-color: yellow; z-index: 20; }
#box2 {position: absolute; top: 100px; left: 0px;width: 200px; height: 200px; background-color: lime; z-index: 10; }

html code example:
<div id="wrapper">
    <div id="box1">
        <p>
            This box should be on top</p>
    </div>
    <div id="box2">
        <p>
            box 2</p>
    </div>
</div>

asp:menu on SAFARI

Problem:
dropdown menu /styling within the menu is not applied completely

 

Solution:
        if (Request.UserAgent.IndexOf("AppleWebKit") > 0)
        {

            Request.Browser.Adapters.Clear();

        }

CSS hack list

well these hacks actually really work, i tested it myself. 

For one CSS file: 

  1. /*IE7 HACKS*/
    html > body #ie7 {background-color:#f00;}
  2. /*IE6 HACKS*/
    * html #ie6 {background-color:#0f0;}
  3. /*IE HACKS*/
    #ie6 {background-color:#00f;}
  4. >FF1.0
    #hackme, x:-moz-any-link {styles for Firefox 1.0 here}#hackme, x:-moz-any-link, x:only-child {restore normal styles for newer versions}
  5. >FF2.0
    #hackme, x:-moz-any-link {styles for Firefox 2.0 here}
    #hackme, x:-moz-any-link, x:default {restore styles for Firefox 3.0 and newer}

For seperate Css files:

  1. For IE:
    <!–[if IE]>
    <link rel="stylesheet" href="ie7.css" type="text/css" media="screen" />
    <![endif]-->

     

  2. Non IE:
    <!--[if !IE]>-->
    <link rel="stylesheet" href="default.css" type="text/css" media="screen" />
    <!--<![endif]-->
    							

List from friends:
1. Thomas ( thank  man :P )

getting transparent div backgrounds working in all browsers

* html #overlay{
background-color: #333;
back\ground-color: transparent;
background-image: url(img/blank.gif);
filter: progid: DXImageTransform.Microsoft.AlphaImageLoader(src="img/overlay.png", sizingMethod="scale");

} 

 

 

list of resource:

  1. http://www.puidokas.com/efficient-conditional-comments/
  2. http://pornel.net/firefoxhack
  3. http://www.webdevout.net/css-hacks#unrecommended-body_empty

i will update the list if i found one :) . any help for updating would be nice

Get Adobe Flash playerPlugin by wpburn.com wordpress themes