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
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="" xml:lang="en" lang="en">
<title>Simple Expanding</title>
<script language="javascript">
function show(){'inline';
function hide(){'none';
<div id="d1" style="z-index:2;position:relative">
<img src="" onMouseOver="show()" onMouseOut="hide()"/>
<div id="d6" style="z-index:3;position:relative">
<img src=""/>
<div id="d2" style="z-index:1;position:relative">
sadnjaksd asdlknasldnas<br />
<script language="javascript">
var ddd = document.getElementById('d6');

Mahendran A.
Feb 8 '08 #3

Post your reply

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