Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

divs

Options
  • 20-11-2008 10:40pm
    #1
    Registered Users Posts: 8,070 ✭✭✭


    example

    using absolute div with left and right properties, seems to show up different for different resolutions ?

    thanks


Comments

  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    Yup, that's to be expected.

    If you have a screen 800 pixels wide, and the left is 400 pixels, then it'll appear halfway across. But if the screen is 1600 pixels wide, it'll appear a quarter way across.

    What are you trying to do ?

    And on your example page, is there a wrapper holding the content in the centre ? If so, try a "relative" rather than "absolute" position.


  • Registered Users Posts: 8,070 ✭✭✭Placebo


    whats the point of div's with absolute positioning then ? px and % both give different results on different res. ugh


    everything there is in a table, thought it would be easier if i place the phone on a div. as with different tables now il have to chop it up


  • Closed Accounts Posts: 2 spruce


    One of the places to use divs with an absolute position is inside a div with a relative position.

    Set your container's position to relative. Then set the contained divs position to absolute, now when you change left, right, top or bottom the values you give will be absolute within the containing box. Generally speaking the container in this case will have a fixed width and or height. So the absulte position within it will be consistent across browsers. [edit:meant to say will be consistent across different resolutions]


Advertisement