Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   viewing in wide screen format??? (https://www.warriorforum.com/programming/141799-viewing-wide-screen-format.html)

Jagged 5th November 2009 07:17 PM

viewing in wide screen format???
 
Is there some kind of script that allows your website to resize to different browsers....at different screen resolution settings?

I have an existing website for a client...with static images....that works great in IE, firefox & other browsers when you use a normal screen resolution setting, such as 800x600, 768x1024......but gets jacked up if viewed in wide screen format....

What could I do to cure this?

Thanks,
Ken

Gimme4Free 5th November 2009 07:39 PM

Re: viewing in wide screen format???
 
I'm not sure about software but I use Check Browser Compatibility, Cross Platform Browser Test - Browsershots for Browsers and it also tells you the screen size, operating system, browser and browser version.

FrankJohnson 5th November 2009 09:05 PM

Re: viewing in wide screen format???
 
Well, you could use percentages for widths.

Go to Google and search on "Fixed vs. Fluid vs. Elastic Layout: What's The Right One For You". The first link is from Smashing Magazine and is a pretty good treatment of the issues.

Hope that helps.

Frank

Binggo 6th November 2009 11:09 AM

Re: viewing in wide screen format???
 
HTML Code:

<head>
<script type="text/javascript">
window.onload=function(){
    var oImg = document.getElementById("oImg");
    var iW = parseInt(screen.width);
    if(iW>1279){ // assume 1280 is max
        oImg.src="1280.jpg";
    }else if(iW>1151){
        oImg.src="1152.jpg";
    }else if(iW>1023){
        oImg.src="1024.jpg";
    }else if(iW>959){
        oImg.src="960.jpg";
    }else{
        oImg.src="800.jpg";
    }
}
</script>
</head>
<body>
<img id="oImg" src="" alt="image"/>

That should work.


All times are GMT -6. The time now is 12:40 PM.