user2323454
user2323454

Reputation: 1

Css Media Queries Resolution Issue

I was wondering how I can use CSS Media Queries to detect screen resolution and make a different page load if the screen resolution is under 1024x768? I also need to know if I can place this query in my master.css script? or where it would need to be placed?

Sitemap (without Java included)

Upvotes: 0

Views: 498

Answers (1)

ralph.m
ralph.m

Reputation: 14345

You can serve up different styles to a page based on the width of the browser viewport in various ways, such as this:

@media only screen and (max-width: 1024px) {
  your styles here
}

You can put that anywhere in your style sheets.

Be aware, though, that you can't use media queries like this to load a different page. For that, you'd need some kind of device detection script.

Upvotes: 1

Related Questions