Fixed Resolution Advice

Discussion in 'HTML & Website Design' started by zeninho, Sep 5, 2011.

  1. #1
    hi everybody!!

    i have question regarding website resolution. I have element that i want to be allways in screen so i put this code for it:
    <div style="position:fixed;">

    it works just fine until i switch to other resolution (control plus +/-).. then my element starts to move, and that is not good...
    so how can i "fix" this problem, is there any other code i could try or some kind of "auto resolution adjusting" for incoming visitors..

    any help or advice would be great


    thnx in advance
     
    zeninho, Sep 5, 2011 IP
  2. xira

    xira Active Member

    Messages:
    315
    Likes Received:
    8
    Best Answers:
    4
    Trophy Points:
    68
    #2
    Can you post a link with an example of exactly what you're trying to do? Perhaps there is a better approach, becaue "fixed position" is just that. As you mentioned, as your resolution changes, it's position stays fixed according to the measurements you gave. Technically you can try using percents instead of pixels, but percents won't help you when people's resolutions change proportion.

    Another approach would be to use position:relative, but it won't respond to the z-index (layering) then, however you can play with percents and negetative margins.

    In short, you can't account for all screen resolutions and have your items positioned exactly where you want them, unless you use a fixed sized site from the start. But then of course, people will small resolutions have to scroll around and those with huge resolutions will see a tiny site and a lot of background. You best option is to create a design that is flexible.

    Again, if you have a link so I can see what you're trying to do exactly, I might have better advice for you.
    Cheers
     
    xira, Sep 5, 2011 IP