...

View Full Version : CSS Positioning Problem (most likely simple)



Worsin
01-23-2007, 07:29 PM
I have a site with a Flash Object layered over the rest of the site.

Im using CSS to position it. The problem is when i get it all positioned and view it on another computer its all out of whack. Also if i take my LCD i position it on and turn my monitor to Profile Mode it does the same thing. Im guessing that a difference is resolution is causing this.

Here is the site: http://orderoftwilight.net/index.php?option=com_smf&Itemid=41

Here is the Code


#flash{
position: absolute;
z-index:5;
visibility: visible;
top: 200px;
left: 460px;
width: 450px;
height: 90px;
}



Thanks

Worsin

I am guessing something is missing.

felgall
01-23-2007, 07:34 PM
That will position the flash at a fixed position relative to the top corner of the browser (or relative positioned container if it is in one). What exactly is under it depends on how the rest of the page is laid out and probably will change with the size of the browser window.

Worsin
01-23-2007, 07:53 PM
That will position the flash at a fixed position relative to the top corner of the browser (or relative positioned container if it is in one). What exactly is under it depends on how the rest of the page is laid out and probably will change with the size of the browser window.

So what is the solution?

felgall
01-23-2007, 10:40 PM
don't position absolute relative to the whole page if you need it aligned relative to certain content.

Several alternatives.

1. just code it inline where you want it between the other content and set margins and padding to align it.

2. specify position:relative on the content it is related to and nested within. The absolute positioning will then be relative to that content rather than the whole page.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum