[ 3 posts ] 
Author Message
 Post subject: div in the foreground
PostPosted: Fri Jul 09, 2010 2:43 pm 

Joined: Sun Apr 25, 2010 7:10 pm
Posts: 10
hey guys,

in my app, i want to put a div in the foreground - so i wrote for this element in the style:

margin-top: 10px;
margin-bottom: 10px;
margin-left: 10px;
margin-right: 10px;

but it doesn't works. I want to show it in front of a list but it is under the list. What is wrong??

bernhard


Top
 Profile  
 
 Post subject: Re: div in the foreground
PostPosted: Fri Jul 09, 2010 5:09 pm 

Joined: Thu Jul 16, 2009 11:30 pm
Posts: 861
Location: Austin, TX (@sugar_dave on Twitter)
Try setting a high z-index.

z-index: 999999;

_________________
Dave Freeman
Developer Relations webOS SWAT Engineer


Top
 Profile  
 
 Post subject: Re: div in the foreground
PostPosted: Fri Jul 09, 2010 8:46 pm 
User avatar

Joined: Mon Apr 19, 2010 10:54 pm
Posts: 286
bernhard wrote:
hey guys,

in my app, i want to put a div in the foreground - so i wrote for this element in the style:

margin-top: 10px;
margin-bottom: 10px;
margin-left: 10px;
margin-right: 10px;

but it doesn't works. I want to show it in front of a list but it is under the list. What is wrong??

bernhard


Setting margins won't will just add spacing around your div. It won't change where it is positioned.

It sounds like you want to do something like this:
position: absolute;
left: 50px;
top: 50px;

Depending on where the div is in the document you may also need to adjust the zIndex to make sure it is "on top" of the list.


Top
 Profile  
 
Display posts from previous:  Sort by  
   [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron