CraZyDroiD
CraZyDroiD

Reputation: 7105

Change CSS according to screen size

I'm working a mobile application using angularjs and ionic framework.My application is for both Tab and Mobile versions. I cant use the same CSS for Tab and Mobile, so is there a way to detect the screen size and change the CSS accordingly?

I found a jquery code that does this but i'm not sure if i can use this in angularjs.If i can how?

http://www.master-script.com/detect-screen-size-with-jquery-and-apply-a-css-style.html

Can i have a step by step instructions on how to do this? Thanks in advance :)

Upvotes: 1

Views: 1302

Answers (2)

invinciblejai
invinciblejai

Reputation: 1293

https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries

Hope this helps , can also use bootstrap.

Upvotes: 1

jriley88
jriley88

Reputation: 117

You will want to look into Media Queries. You can have sets for width or height ranges. Max width and min width. Viewports for specific devices.

Upvotes: 0

Related Questions