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? Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.