lunac Posted November 3, 2006 Share Posted November 3, 2006 Please check out this site : [url=http://qualityfirstcleaning.com/]http://qualityfirstcleaning.com/[/url]. I have a swf file in the top right corner and I'm trying to figure out how to get it to work with the page. Because I have that purple band stretching across the page, I can't just have this float over it. So I placed it on its own layer. But now, it doesn't gel with the rest of the page. The rest of the page has the margins set to auto, so that when you change browser size it will re-center itself. But the swf div doesn't want to do that. It stays in the place while everything else moves.Here's the CSS I have for it:[code]#swf {z-index:15; position: absolute; margin: auto; width: 700px; padding-left: 580px; top: 133px;}[/code]Does anyone know how I can fix this? Link to comment https://forums.phpfreaks.com/topic/26078-make-z-index-have-auto-margins/ Share on other sites More sharing options...
wildteen88 Posted November 3, 2006 Share Posted November 3, 2006 As you are positioning the swf div. Then auto margins will fail to work as the absolute positioning will override it.What you'll want to do is put the swf div inside the header div and remove the absolute positioning. That should fix it. If I understand your problem correctly. Link to comment https://forums.phpfreaks.com/topic/26078-make-z-index-have-auto-margins/#findComment-119216 Share on other sites More sharing options...
jcombs_31 Posted November 3, 2006 Share Posted November 3, 2006 Or, you can set your container div to position: relative, and then the swf div will be absolutely positioned within the outer container rather than the body itself. Link to comment https://forums.phpfreaks.com/topic/26078-make-z-index-have-auto-margins/#findComment-119230 Share on other sites More sharing options...
lunac Posted November 3, 2006 Author Share Posted November 3, 2006 Removing the absolute positioning moves everything down on the page.And I'm not sure what you mean, jcombs_31, by container div. It's not being contained by anything else. The layout is:<header><swf><bar>It's between header and bar, but it needs to float over both of them. Link to comment https://forums.phpfreaks.com/topic/26078-make-z-index-have-auto-margins/#findComment-119239 Share on other sites More sharing options...
lunac Posted November 3, 2006 Author Share Posted November 3, 2006 Yup, I think I got it. I changed it to relative, but I also moved it to the top:<swf><header><bar>Now it seems to be working. I'm firing up VPC now to check it in explorer and to get my measurements right. Thanks for the help. Link to comment https://forums.phpfreaks.com/topic/26078-make-z-index-have-auto-margins/#findComment-119248 Share on other sites More sharing options...
lunac Posted November 3, 2006 Author Share Posted November 3, 2006 Ok, that's not really the solution because now the text at the top is being smooshed, instead of going all the way across. Link to comment https://forums.phpfreaks.com/topic/26078-make-z-index-have-auto-margins/#findComment-119263 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.