VaporAction Posted January 10, 2007 Share Posted January 10, 2007 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...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? Link to comment Share on other sites More sharing options...
jesh Posted January 10, 2007 Share Posted January 10, 2007 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?Yes. This link should help. Read the 4th or 5th post down.http://forums.devshed.com/flash-help-38/fl...-div-64464.html Link to comment Share on other sites More sharing options...
reportingsjr Posted January 10, 2007 Share Posted January 10, 2007 You only have one problem, its very common. I used to do it actually.. To use z-index you have to have position: absolute;. Nothing else will work with it. Link to comment Share on other sites More sharing options...
VaporAction Posted January 10, 2007 Author Share Posted January 10, 2007 You only have one problem, its very common. I used to do it actually.. To use z-index you have to have position: absolute;. Nothing else will work with it.nope, position: fixed works with z-index as well...I set the wmode="transparent" for the swf file and that works BUT ONLY if there arent' any images in the nav bar...if there's images then the swf file still overlaps, although it's tranparent...is there something about images creating some sort of weakness in the z-index? Link to comment Share on other sites More sharing options...
jesh Posted January 10, 2007 Share Posted January 10, 2007 What if it had something to do with images being inline elements? Perhaps position: fixed; only works right with block level elements. You might try chaging your CSS so that the image has: .navImage {display: block;position: fixed;z-index: 50;} Link to comment Share on other sites More sharing options...
VaporAction Posted January 11, 2007 Author Share Posted January 11, 2007 What if it had something to do with images being inline elements? Perhaps position: fixed; only works right with block level elements. You might try chaging your CSS so that the image has:.navImage {display: block;position: fixed;z-index: 50;} tried that, didn't work...I have the img inside a div anyway which displays as a block anyway, I think? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now