How to have an Div on top of the Other items present in the page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • reply2mahendran
    New Member
    • Feb 2008
    • 5

    How to have an Div on top of the Other items present in the page

    Hi guys,

    I need a DIV to be coming on top of every thing present in that page. I dont want to use absolute. How to do that.

    Thanks for your comments.

    Mahendran A.
  • Death Slaught
    Top Contributor
    • Aug 2007
    • 1137

    #2
    Give it a z-index.

    ^_^ Hope it helps, Thanks, Death

    Comment

    • reply2mahendran
      New Member
      • Feb 2008
      • 5

      #3
      Hi guys,

      I have two pictures. If you move the mouse over the first one the second will appear, if you move the mouse out then the second will disappear. After this two images I have some texts.This is working fine. But I want the second image to be shown on top of the remaining texts.

      Please give your suggestions.

      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      <head>
      <title>Simple Expanding</title>
      <script language="javas cript">
      function show(){
      ddd.style.displ ay='inline';
      }
      function hide(){
      ddd.style.displ ay='none';
      }
      </script>
      </head>
      <body>
      <div id="d1" style="z-index:2;positio n:relative">
      <img src="http://www.leviossa.co m/images/index_02.gif" onMouseOver="sh ow()" onMouseOut="hid e()"/>
      </div>
      <!--Effect.toggle(' d6','appear')-->
      <div id="d6" style="z-index:3;positio n:relative">
      <img src="http://www.leviossa.co m/images/index_03.gif"/>
      </div>
      <div id="d2" style="z-index:1;positio n:relative">
      sadnjaksd asdlknasldnas<b r />
      </div>
      <script language="javas cript">
      var ddd = document.getEle mentById('d6');
      </script>
      </body>
      </html>

      Thanks,
      Mahendran A.

      Comment

      Working...