View Single Post
Old 01-29-2013, 01:14 AM   PM User | #4
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,469
Thanks: 9
Thanked 466 Times in 450 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
Quote:
Originally Posted by eydg View Post
yes, i need it to work with phones too.

media queries - if i understand the linked tutorials - involve several different css'es applied depending on various conditions, like f e screen resolution.

this would greatly complicate future reediting. If possible at all, i would like to stay with js.

it appears to work. thank you.
my $0.02: i think putting CSS into JS would greatly complicate future reediting. CSS belongs in CSS files, where it controls presentation. JS is for behavior, and behavior, content, and presentation should be kept separate.

all you would need to do is define your small screen class inside a small screen media query.



i like to use min/max for everything for greater cut and pastability:
Code:
/* between 1 and 250px wide :*/
@media screen and (min-width:1) and (max-width:250) {
	.bigga { display: none; }
}
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.6% IE9:9.8% IE10:10%
rnd me is offline   Reply With Quote