Fixed Dimensions and Positioning

Discussion in 'Web Design and Development' started by dingdongbubble, Jul 28, 2007.

  1. dingdongbubble macrumors 6502a

    Joined:
    Jun 1, 2007
    #1
    I it possible to fix the dimensions and position of the different elements of a page so that no matter which browser accesses them at whatever windows size, the design does not mess up. My guess is that I put <div> tag around the whole body?
     
  2. thejadedmonkey macrumors 604

    thejadedmonkey

    Joined:
    May 28, 2005
    Location:
    Pa
    #2
    Short answer: No. IE's margins are different from Mozilla's, which I believe are different from Safari's, so even when you go through and make everything pixel perfect, it's not pixel perfect on a different browser:mad:

    long ansewer: yes, of course, anything is possible:D
    You may need different style sheets to get it pixel perfect (one for each major browser), but if you're just going for a general (within a few pixels) layout, it's not hard. You'll want to check out the use of the CSS attributes position:absolute, position:relative, (and position:fixed, which IE6 doesn't support). Float:left and float:right might be helpful too, but without seeing a mock-up of what you're looking for, I can't really tell you much more.

    P.S. You can also use style sheets to give the body a width.. it'd look like
    Code:
    body {
    width:600px;
    }
    or use height and width styles on a div like so:
    Code:
    <div style="height:500px;width:300px;">
     

Share This Page