# Monitor Size Problem

**URL:** <https://www.ruby-forum.com/t/monitor-size-problem/173864>\
**Category:** Rails\
**Created:** [August 17, 2009, 12:05pm UTC](https://www.ruby-forum.com/t/monitor-size-problem/173864 "2009-08-17T12:05:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [August 17, 2009, 12:05pm UTC](https://www.ruby-forum.com/t/monitor-size-problem/173864/1 "2009-08-17T12:05:58Z")

</div>

Champs,

Need help … Not related to rails or ruby … 🙂  
Scenario is dat i had developed my application at a 17inch monitor … so  
used big size images as well… i mean according to big screen monitor …  
Now if run this application at a 14inch monitor … application is not  
looking good … So want to change this scenario … I mean can we know  
dynamically dat if monitor size is small that make everything small on  
monitor… 🙂

Hope u peopl got it right … want to know every possible way …

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [August 17, 2009, 1:42pm UTC](https://www.ruby-forum.com/t/monitor-size-problem/173864/2 "2009-08-17T13:42:00Z")

</div>

Hemant B. wrote:

> Champs,
> 
> Need help … Not related to rails or ruby … 🙂  
> Scenario is dat i had developed my application at a 17inch monitor … so  
> used big size images as well… i mean according to big screen monitor …  
> Now if run this application at a 14inch monitor … application is not  
> looking good … So want to change this scenario … I mean can we know  
> dynamically dat if monitor size is small that make everything small on  
> monitor… 🙂
> 
> Hope u peopl got it right … want to know every possible way …

Using javascript you can get the height and width of the client machine.  
Use it to render various versions of your page.

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [August 17, 2009, 1:47pm UTC](https://www.ruby-forum.com/t/monitor-size-problem/173864/3 "2009-08-17T13:47:05Z")

</div>

Make sure you understand that this is not actually related to the size  
of the screen, but to the resolution the system uses.

You could get the window size using javascript and even dynamically  
change your application as the window is resized. I wouldn’t know of  
any way Rails can determine the system resolution or something like  
that.

It would be better though if you would spend some time on your HTML  
and CSS and make sure it will show the way you want it to show on any  
resolution. People don’t care about horizontal scrollbars in 640x480:  
they’re probably used to that. So using a fixed layout will probably  
be fine.

Hope this helps!

Kind regards,  
Jaap H.  
w. [http://www.relywebsolutions.nl](http://www.relywebsolutions.nl)

On 17 aug, 12:05, Hemant B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [August 17, 2009, 1:47pm UTC](https://www.ruby-forum.com/t/monitor-size-problem/173864/4 "2009-08-17T13:47:37Z")

</div>

yeah, I know abt it.  
we can know height and width from clientHeight and clientWidth …  
correct …

Bt d’nt know how to go further… Newayz … Thanks for ur reply …

Rails L. wrote:

> Using javascript you can get the height and width of the client machine.  
> Use it to render various versions of your page.

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [August 17, 2009, 2:16pm UTC](https://www.ruby-forum.com/t/monitor-size-problem/173864/5 "2009-08-17T14:16:46Z")

</div>

Are your vowels really so precious that you cannot post complete words?  
It would make it much easier to read your posts in general.

When posting to forums that are international in their audience, clarity  
is preferred over brevity. Just a suggestion.

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [August 17, 2009, 9:00pm UTC](https://www.ruby-forum.com/t/monitor-size-problem/173864/6 "2009-08-17T21:00:16Z")

</div>

On Monday 17 August 2009, Hemant B. wrote:

> yeah, I know abt it.  
> we can know height and width from clientHeight and clientWidth …  
> correct …
> 
> Bt d’nt know how to go further… Newayz … Thanks for ur reply …
> 
> Rails L. wrote:
> 
> > Using javascript you can get the height and width of the client  
> > machine. Use it to render various versions of your page.

Here’s how I’ve done a thing like that in the past

[http://www.schuerig.de/michael/blog/index.php/2007/02/22/size-dependent-](http://www.schuerig.de/michael/blog/index.php/2007/02/22/size-dependent-)  
layout/

HTH,  
Michael

–  
Michael S.  
[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[http://www.schuerig.de/michael/](http://www.schuerig.de/michael/)
