467,162 Members | 931 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,162 developers. It's quick & easy.

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.
Feb 7 '08 #1
  • viewed: 1044
Share:
2 Replies
Death Slaught
1GB
Give it a z-index.

^_^ Hope it helps, Thanks, Death
Feb 7 '08 #2
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="javascript">
function show(){
ddd.style.display='inline';
}
function hide(){
ddd.style.display='none';
}
</script>
</head>
<body>
<div id="d1" style="z-index:2;position:relative">
<img src="http://www.leviossa.com/images/index_02.gif" onMouseOver="show()" onMouseOut="hide()"/>
</div>
<!--Effect.toggle('d6','appear')-->
<div id="d6" style="z-index:3;position:relative">
<img src="http://www.leviossa.com/images/index_03.gif"/>
</div>
<div id="d2" style="z-index:1;position:relative">
sadnjaksd asdlknasldnas<br />
</div>
<script language="javascript">
var ddd = document.getElementById('d6');
</script>
</body>
</html>

Thanks,
Mahendran A.
Feb 8 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Varun | last post: by
9 posts views Thread by Greg Collins [Microsoft MVP] | last post: by
reply views Thread by =?Utf-8?B?bWFib25k?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.