Jump to content

make z-index have auto margins???


Recommended Posts

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

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.
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.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.