Javascript to Adjust Css Position?

Discussion in 'HTML & Website Design' started by GhostDragon, Jun 28, 2008.

  1. #1
    I'm getting held up on this.. So any help is much appreciated. Here's what I'm trying to do;

    I'm trying to figure out a javascript that will change my div position depending on window width.

    If the window width is > 1000 (or whatever), then position the div absolute 1%
    If the window width is < 1000, then position the div absolute in pixels.



    I understand about absolute/relative and pixels/percentage and the advantages of both. But the reason why I'm thinking I need a javascript is because I'm trying to run two different metrics (% or Pix) depending on the screen size.

    Any thoughts ideas? Much appreicated
     
    GhostDragon, Jun 28, 2008 IP