Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS Positioning Problem (most likely simple)

    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..._smf&Itemid=41

    Here is the Code
    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.

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,622
    Thanks
    0
    Thanked 645 Times in 635 Posts
    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.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by felgall View Post
    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?

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,622
    Thanks
    0
    Thanked 645 Times in 635 Posts
    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.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •