NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page z-index of img not working

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 01-10-2007, 08:44 AM THREAD STARTER               #1 (permalink)
New Member
Join Date: Nov 2006
Posts: 12
VaporAction is an unknown quantity at this point
 



z-index of img not working


I'm making a navigation bar at the top of the page that I want to remain fixed while the use scrolls down the page...I have no problems if I make the bar with HTML and CSS but when I tried to make the bar from an image it doesn't seem to work...specifically, the image doesn't seem to be taking the z-index that I give it so that when you scroll the rest of the page runs over top of it...
????: NamePros.com http://www.namepros.com/programming/279535-z-index-of-img-not-working.html
I'm using Firefox so it has nothing to do with the various IE bugs...
the CSS I'm using runs something like this....

.navImage {
position: fixed;
z-index: 50;}

the only other clue is that the content of the page is an embedded swf file...is there something about the z-index of swf files and images?
VaporAction is offline  
Old 01-10-2007, 08:50 AM   #2 (permalink)
NamePros Regular
Join Date: Sep 2006
Posts: 223
-bank- has a spectacular aura about-bank- has a spectacular aura about
 



From what I understand you are applying this straight to the image correct? If so try using a div tag with the width and height the same as the image, and apply the z-index to the div rather than the image.
-bank- is offline  
Old 01-10-2007, 08:56 AM   #3 (permalink)
NamePros Regular
 
beaver6813's Avatar
Join Date: May 2005
Location: England
Posts: 390
beaver6813 is a jewel in the roughbeaver6813 is a jewel in the roughbeaver6813 is a jewel in the rough
 




Agreed with -bank-. Put the image into a div, this should make it work, apple the things to the div and not the image, the image will move along with the div
????: NamePros.com http://www.namepros.com/showthread.php?t=279535

Code:
<style type="text/css">
.navImageDiv {
position: fixed;
z-index: 50;
height:auto;
width:auto;}
</style>
<div class='navImageDiv'>
<img src="nameproslogo.gif" title="Namepros Logo">
</div>
Haven't tested, lemme know if it works
beaver6813 is offline  
Old 01-10-2007, 09:01 AM   #4 (permalink)
NamePros Regular
Join Date: Mar 2006
Location: United Kingdom
Posts: 413
lee101 is a jewel in the roughlee101 is a jewel in the roughlee101 is a jewel in the rough
 




Try applying the z-index attribute to the diz or whatever is containing the image, and set one for the container of the item you want it to overlay which is lower
__________________
Linux Screenshots
lee101 is offline  
Old 01-10-2007, 09:07 AM   #5 (permalink)
NamePros Regular
Join Date: Sep 2006
Posts: 223
-bank- has a spectacular aura about-bank- has a spectacular aura about
 



Originally Posted by lee101
to the diz or whatever is containing the image
to the diz its a <div> tag, part of xhtml and css.
????: NamePros.com http://www.namepros.com/showthread.php?t=279535

thanks for totally clearing it up beaver6813, my post was slightly wish washy
-bank- is offline  
Old 01-10-2007, 01:14 PM THREAD STARTER               #6 (permalink)
New Member
Join Date: Nov 2006
Posts: 12
VaporAction is an unknown quantity at this point
 



I applied the css to a div containing the img but it still doesn't work BUT I have since discovered that you can set the swf's param to "wmode"="transparent" which seems to make it more z-index friendly BUT ONLY if there arent' any images in the nav bar...is anyone familiar with why including an image in a nav bar would weaken it's z-index? I even tried placing a div under the image to sort of bolster it, but that didn't work...
VaporAction is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 02:18 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger