Target 800 x 600 specifically?

6 views
Skip to first unread message

nicklansdell

unread,
Aug 4, 2010, 10:33:03 AM8/4/10
to EnhanceJS
Hi Scott,

Is it possible to target one monitor resolution specifically with
EnhanceJS? I am using it as you suggested for mobile detection but I
am creating a site that has a section with very large background
images that would really benefit from the images being optimised for
800 x 600.

Many thanks,

Nick.

Scott Jehl

unread,
Aug 4, 2010, 12:11:32 PM8/4/10
to enha...@googlegroups.com
Hi Nick,
You could do that with EnhanceJS, but it might be best to handle it with media queries within your CSS (assuming you're talking about browsers that support media queries). Something like…

body { background: url(a.png); }
@media screen and (max-width: 800px) {
body { background: url(b.png); }
}

Hope that helps.
-Scott

> --
> You received this message because you are subscribed to the Google Groups "EnhanceJS" group.
> To post to this group, send email to enha...@googlegroups.com.
> To unsubscribe from this group, send email to enhancejs+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/enhancejs?hl=en.
>

nicklansdell

unread,
Aug 4, 2010, 12:39:32 PM8/4/10
to EnhanceJS
Hi Scott,

Many thanks for the reply.

I am wanting to target desktop browsers that pass the capabilities
test. The site will also use EnhanceJS to target mobile devices. Will
the media query you have suggested here target all screen sizes up to
800px wide including mobile and desktop?

I would like to target the following with EnhanceJS

1. Desktop browsers 1024 x 768 and above with an optimised layout.
2. Desktop browsers 800 x 600 with an optimised layout.
3. Mobile browsers with an optimised layout.
4. A basic experience for all devices.

The website www.bikes.com has a similar background image if this helps
to further explain what I am trying to achieve.

I am looking forward to the post you are working on about targeting
mobile browsers so I can get a better understanding of this process.

Thanks again for the help.

Nick.
Reply all
Reply to author
Forward
0 new messages