By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,676 Members | 1,763 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,676 IT Pros & Developers. It's quick & easy.

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

P: 5
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
Share this Question
Share on Google+
2 Replies


Death Slaught
100+
P: 1,137
Give it a z-index.

^_^ Hope it helps, Thanks, Death
Feb 7 '08 #2

P: 5
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.