Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2008
    Location
    Indonesia
    Posts
    13
    Thanks
    0
    Thanked 1 Time in 1 Post

    Smile select tag z-index bug

    I have the following code:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>How to fix this in IE</title>
        <style>
            * {
                margin:0;
                padding:0;
                font-family:arial,serif;
                font-size:12px;
            }
            div.outer {
                position:absolute;
                background:#fc0;
                width:250px;
                height:100px;
                z-index:999;
            }
            div.inner {
                top:50px;
                left:50px;
                position:absolute;
                background:#f00;
                width:100px;
                height:100px;
                z-index:1;
            }
        </style>
    </head>
    <body>
        <h1>Please take a look this file in Internet Explorer &amp; Mozilla Firefox, how can they're so different?</h1>
        <h1>Why in IE I can't cover the Test_option (tag select &amp; option) width div outer??</h1>
    
        <div class="outer">
            div outer to cover the Test_Option
        </div>
        <div class="inner">
            <form>
                <select><!-- this select-option should covered by div outer,except in IE -->
                    <option>Test_Option</option>
                </select>
                <input type="submit" /><!-- this button should covered by div outer -->
            </form>
        </div>
        
    </body>
    </html>
    but not work well in both firefox and IE, does anyone know how to fix??
    Last edited by kuse50; 07-14-2008 at 10:51 AM.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,858
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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