Changing CSS for mobile devices with Javascript -


i've encountered bit of confusing challenge css/javascript. i'm making simple page, , want layout different mobile users. however, can't seem change size of input forms.

if user's on mobile, have following javascript run:

document.getelementbyid("bookimage").style.display="none"; document.getelementbyid("inputs").style.width="140px"; 

so hides image, , should reduce width of input boxes 140px. unfortunately, while hides image, input fields unchanged.

i took code outside if statement applies device, , on desktop inputs resized. tried setting style.display="none", again works desktop nothing on mobile. cleared phone's cache, no change. when set width directly in css styles section has no effect on phone displays. (i'm using samsung running android if that's relevant.)

i can't fathom why works 1 particular function. advice appreciated.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo