Display Size

Discussion in 'HTML & Website Design' started by Fat Corgi, May 30, 2009.

  1. #1
    Hi Everyone,
    I'm relatively naive when it comes to webdesign, but I have managed to put together a site that I am maintaining. (brockmetalcraft.com.au) My question is this. I would like know if it is possible to make sure that when people navigate to this site the page is the correct dimensions ie. 1024x 768. It looks best this way, but browsers will display it in all shapes and sizes by default. I would like to change this. I am using dreamweaver CS3.

    Thanks
    T
     
    Fat Corgi, May 30, 2009 IP
  2. saxDesigns

    saxDesigns Peon

    Messages:
    491
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    At the moment the fixed width goes to 1020px, which isn't a bad choice, as 1024x768 monitors will cope fine. However, when your viewing with a widescreen monitor (like me), then there is a lot of white space. You need to set the total width of you layout as width: 100%;

    However, you may need to fix the widths of various elements, maybe even adding in new divs, etc
     
    saxDesigns, May 30, 2009 IP
  3. Fat Corgi

    Fat Corgi Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for your quick reply saxDesigns.
    I tried changing the layout width to 100% for the page, and the table that is the primary element of each of the pages. The result was that it spread the design across the whole browser window on my monitor (wide screen as well). Is there a way to keep the current layout and force the viewers browser window to resize to 1024 x 768 when viewing the pages?
    Thanks
    T
     
    Fat Corgi, May 30, 2009 IP
  4. unigogo

    unigogo Peon

    Messages:
    286
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You have to use javascript
    window.onload = function(){
    var w =window.screen.Width;
    var h = window.screen.height;
    window.resizeTo(w,h);
    }
     
    unigogo, May 30, 2009 IP
  5. saxDesigns

    saxDesigns Peon

    Messages:
    491
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Ah right, now I get you... Yeah, Javascript is what you want, try the code above.
     
    saxDesigns, May 30, 2009 IP