4 Replies Latest reply: Nov 23, 2008 10:51 AM by Old Toad
rossn49 Level 1 Level 1 (0 points)
i have just finished my site which can be seen here www.jbpermanentcosmetics.co.uk The site looks fine on my Macbook pro on Mac and windows but it is way too large for 4:3 monitors. The site width is 1200 which in hindsight is too large really but i don't want to have to resize the whole website. Is there any HTML code which i can add which will auto resize the page to avoid horizontal scrolling?

macbook pro, Mac OS X (10.5.5)
  • Old Toad Level 10 Level 10 (127,615 points)
    Have you Googled for "auto resize web page". There are a pretty good number to hits covering that subject when you do. Many may be HTML based requiring you to do some post publishing editing. Look for those that are javascript based and can be used with an HTML Snippet. The one user here that would know how is Cyclosaurus. He's simply amazing when it comes to applying javascript to iWeb pages to do all sorts of amazing things. He'll be here soon I'm sure (are you listening Cyclosaurus?)



    OT
  • rossn49 Level 1 Level 1 (0 points)
    I found the following code which looks like it might do what i want:

    <SCRIPT language="JavaScript">
    <!--
    if ((screen.width>=1024) && (screen.height>=768))
    {
    window.location="highres.html";
    }
    else
    {
    window.location="lowres.html";
    }
    //-->
    </SCRIPT>


    I don't know whether you can confirm Cyclosaurus?
  • Cyclosaurus Level 6 Level 6 (12,915 points)
    rossn49 wrote:
    I found the following code which looks like it might do what i want:

    <SCRIPT language="JavaScript">
    <!--
    if ((screen.width>=1024) && (screen.height>=768))
    {
    window.location="highres.html";
    }
    else
    {
    window.location="lowres.html";
    }
    //-->
    </SCRIPT>



    rossn49, you can not use that javascript. It switches between two pages/sites (I bolded the code), which means you have to add another site with narrow width.... you indicated that you wouldn't like to do that.

    However, you can find the sweet spot for your site design; many people started to design their sites for regular computer and also accommodate mobile devices such as iPhone.
    You may like to do just that, iPhone's resolution is 960px wide, so I would conservatively take it down to 900px~920px wide.
    -----------------------
    OT, thanks for the good words... I'd not read the forum today. I'd been spending time today to figure out and mount my GPS on my new motorscooter, maybe I will buy motorscootersaurus.com for my new site. LOL!
  • Old Toad Level 10 Level 10 (127,615 points)
    T, thanks for the good words... I'd not read the forum today. I'd been spending time today to figure out and mount my GPS on my new motorscooter


    Oh, us men and our toys. Enjoy the day riding!