Quote:
Originally Posted by eydg
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; }
}