Make Webpage Resize Automatically to Visitor's Resolution??

  • LiveG
  • Novice
  • Novice
  • User avatar
  • Joined: Sep 02, 2003
  • Posts: 27
  • Loc: London
  • Status: Offline

Post February 24th, 2004, 5:25 pm

Hi there guys,

I have designed a "hybrid" (half flash/html) site.
I would like to know if it is possible to make pages in my site resize to suite the visitors' monitor resolution.

For example, I'm using my computer with 1024x768 resolution.
If I change my resolution to 800x600 I want my site to resize to fit the screen resolution of 800x600.

I hope I'm making sense :? Can anyone help?
Thanks
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post February 24th, 2004, 5:25 pm

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post February 25th, 2004, 2:44 am

I don't think anything but IE supports it, and I HIGHLY advise against doing it as it pisses people off, but here's some javascript that will resize the window to the visitors res.
Code: [ Select ]
<script language="javascript">
    X = screen.width;
    Y = screen.height;
    window.moveTo(0,0);
    window.resizeTo(X,Y)
</script>
  1. <script language="javascript">
  2.     X = screen.width;
  3.     Y = screen.height;
  4.     window.moveTo(0,0);
  5.     window.resizeTo(X,Y)
  6. </script>
Strong with this one, the sudo is.
  • LiveG
  • Novice
  • Novice
  • User avatar
  • Joined: Sep 02, 2003
  • Posts: 27
  • Loc: London
  • Status: Offline

Post February 25th, 2004, 4:52 am

so, its a bit of a double edged sword? hmmm :o

ok, I'll give it a try though cause I've always wanted to see the effect. I'll decide what to do with it after. :arrow: I'll let you know if it works

Thanks
  • cerio
  • Proficient
  • Proficient
  • User avatar
  • Joined: Feb 07, 2004
  • Posts: 263
  • Loc: UK
  • Status: Offline

Post February 25th, 2004, 6:29 am

....I HIGHLY advise against doing it as it pisses people off.....


Oh boy, are they right! I get SO pissed off when a site does that. *I* choose what size I view at, no-one else.
  • LiveG
  • Novice
  • Novice
  • User avatar
  • Joined: Sep 02, 2003
  • Posts: 27
  • Loc: London
  • Status: Offline

Post February 26th, 2004, 1:48 pm

Hi there,

I tried to put that code in, but its not working.
Could you tell me where I how and where I should put it?

PS: I'm using Dreamweaver MX
  • Axe
  • Genius
  • Genius
  • User avatar
  • Joined: Jan 07, 2004
  • Posts: 5744
  • Loc: Sub-level 28
  • Status: Offline

Post February 26th, 2004, 2:07 pm

cerio wrote:
Oh boy, are they right! I get SO pissed off when a site does that. *I* choose what size I view at, no-one else.


Yeah, I think that's what he's trying to do. Resize the site to the size of the browser, so that YOU can resize the browser to the size you wanna view at.

If it's set at a fixed width, which I'm guessing is what's already there, then you have NO choice.

Just use tables to get it going, then you can work on more advanced methods..

Code: [ Select ]
<table width="100%"><tr><td>content goes here</td></tr></table>

That's it in its simplest form... With nested tables, and cell background images, etc. You can do much more..

Click the Reptile Rooms link in my sig, and you can see there how the page resizes to fit the browser window using just tables.
  • LiveG
  • Novice
  • Novice
  • User avatar
  • Joined: Sep 02, 2003
  • Posts: 27
  • Loc: London
  • Status: Offline

Post February 26th, 2004, 2:39 pm

Hi, I clicked on your reptilerooms link in your sig and the page doesn't resize like what I'm thinking:

Heres what I want to do. Go here and resize their browser:

http://www.naruto.com

As you can see these guys have also done a hybrid site like mine (half flash/html) and when u make the browser smaller the >whole site<shrinks.
  • Axe
  • Genius
  • Genius
  • User avatar
  • Joined: Jan 07, 2004
  • Posts: 5744
  • Loc: Sub-level 28
  • Status: Offline

Post February 26th, 2004, 2:44 pm

Oh, you actually wanna scale the content... ermm... yeah, that does piss people off :D
  • LazyJim
  • Student
  • Student
  • No Avatar
  • Joined: Feb 15, 2004
  • Posts: 92
  • Status: Offline

Post February 26th, 2004, 3:02 pm

If it was made in ALL FLASH then you send the visitors to the .swf file, it automatically scales to fit the window.

But ALL FLASH is a bad idea too!
  • Kraze
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Feb 25, 2004
  • Posts: 8
  • Loc: New Orleans, LA
  • Status: Offline

Post February 26th, 2004, 6:18 pm

I have to agree that I hate when a web site resizes automatically to my resolution, mainly because I run my monitor at 1600x1200.

Though after looking at that site it seems all you want is to rescale your content based on a browser reload.

I'm not sure how to make Flash resize your content, but you can use either of the following to reload the page in html, if your page is programmed properly then using this will resize your page

Code: [ Select ]
<SCRIPT LANGUAGE="JavaScript1.2">

  function reDo(){ window.location.reload() }
  window.onresize = reDo;

</SCRIPT>
  1. <SCRIPT LANGUAGE="JavaScript1.2">
  2.   function reDo(){ window.location.reload() }
  3.   window.onresize = reDo;
  4. </SCRIPT>
or
Code: [ Select ]
<BODY onResize="window.location.reload()">
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post February 26th, 2004, 8:50 pm

LOL, ok this may be easier than I thought. I've used the source of the link you provided as an explaination.

Code: [ Select ]
When you publish your page open it in notepad, you will see somthing like this

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="100%" HEIGHT="100%" id="naruto_net" ALIGN="">
<PARAM NAME=movie VALUE="naruto_net.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#D2320A> <EMBED src="naruto_net.swf" quality=high bgcolor=#D2320A WIDTH="100%" HEIGHT="100%" NAME="naruto_net" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>

What you need to do to achieve the effect the link you gave does is make sure the anything within the <OBJECT></OBJECT> && <EMBED></EMBED> that says WIDTH="blah" or HEIGHT="blah" looks like the ones here, WIDTH="100%" HEIGHT="100%"
The flash player/browser sees that and knows to scale the movie to be whatever the browsers width & height are. Since the allowScale fsCommand is true by default, unless someone has set it otherwise in the flash movie its self the movie will resize on its own.
  1. When you publish your page open it in notepad, you will see somthing like this
  2. <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
  3. codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
  4. WIDTH="100%" HEIGHT="100%" id="naruto_net" ALIGN="">
  5. <PARAM NAME=movie VALUE="naruto_net.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#D2320A> <EMBED src="naruto_net.swf" quality=high bgcolor=#D2320A WIDTH="100%" HEIGHT="100%" NAME="naruto_net" ALIGN=""
  6. TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
  7. </OBJECT>
  8. What you need to do to achieve the effect the link you gave does is make sure the anything within the <OBJECT></OBJECT> && <EMBED></EMBED> that says WIDTH="blah" or HEIGHT="blah" looks like the ones here, WIDTH="100%" HEIGHT="100%"
  9. The flash player/browser sees that and knows to scale the movie to be whatever the browsers width & height are. Since the allowScale fsCommand is true by default, unless someone has set it otherwise in the flash movie its self the movie will resize on its own.
Strong with this one, the sudo is.
  • LazyJim
  • Student
  • Student
  • No Avatar
  • Joined: Feb 15, 2004
  • Posts: 92
  • Status: Offline

Post February 27th, 2004, 2:03 pm

That's what I was saying - Flash moovies resize all by themselves!

i just didn't know how to embed them.
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post February 27th, 2004, 4:16 pm

LazyJim wrote:
,it automatically scales to fit the window.


Indeed you did, I diddn't see that before.
Sorry for steping on your toes Jim, I was focusing on Gs' replies earlier.
Strong with this one, the sudo is.
  • LazyJim
  • Student
  • Student
  • No Avatar
  • Joined: Feb 15, 2004
  • Posts: 92
  • Status: Offline

Post February 27th, 2004, 5:29 pm

oh no problem stepping on my toes, I've got pleanty of toes!

(actually just hearing someone else know the simple fact brings me hope for the rest f the web! shame it's flash though :( )
  • sputnik
  • Novice
  • Novice
  • No Avatar
  • Joined: Dec 08, 2004
  • Posts: 21
  • Status: Offline

Post June 10th, 2005, 8:48 am

Im having the same problem as well. My site uses tables nested and all and eveything was working fine you could view my site at any resolution and the left to right scroll bar never appeard it would scale to fit the resolution of the viewer but when I started importing blocks and inserting google ads and other stuff something happend it started to get where the left right scroll bar appeared whenever you viewed under really high resolution . I cant figure out why. I even tried to make another page Im creating one main table telling it to be 97% wide and inserting tables inside that main table and still the damned thing spans too wide when you view it on the lower resolutions . Ive seen many sites before that the pages scales to fit but i cant figure out how to make mine do it. Im telling the talbes to take up a percentage and all .

does anyone know how to adress this issue?


If you look at my page: http://sputnikradio.com in different resolutions you will see what im talking about.

Can anyone tell me how to fix it ?


If you look at http://funender.com you will see his page scales to fit I cant figure out why mine will not.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post June 10th, 2005, 8:48 am

Post Information

  • Total Posts in this topic: 18 posts
  • Users browsing this forum: No registered users and 156 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.