# Swapping css for browser resolution- reference screen width?

**URL:** <https://www.ruby-forum.com/t/swapping-css-for-browser-resolution-reference-screen-width/110140>\
**Category:** Rails\
**Created:** [July 23, 2007, 6:44pm UTC](https://www.ruby-forum.com/t/swapping-css-for-browser-resolution-reference-screen-width/110140 "2007-07-23T18:44:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![avenasatira](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e79b87/32.png) [@avenasatira](https://www.ruby-forum.com/u/avenasatira)\
**Post date:** [July 23, 2007, 6:44pm UTC](https://www.ruby-forum.com/t/swapping-css-for-browser-resolution-reference-screen-width/110140/1 "2007-07-23T18:44:57Z")

</div>

Hello.

I’m currently saddened I cant reference the browser width in ruby. I’m  
trying to use a periodically\_call\_remote function to trigger a ruby  
function to change my css based on screen resolutions, but i cant pull  
the screen resolution into a ruby variable!!

How can you do this? I tried a conditional in my  
periodically\_call\_remote, so i can trigger a function call for one  
resolution, but not other!

(this is for swapping iphone resolutions)

anyone?
