Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRifqi Fahmi
23,164 Pointshow to define pixel based on screen resolution ?
how to define pixel based on screen resolution with windows resizer ? for example let we take the viewport screen resolution is 1200 x 911, how much the pixel?
4 Answers
Shezan Kazi
10,807 PointsOh I see. So for this you need to know, that the first value (i.e. 1200) is always the width. The second value (i.e. 911) is the height. Does this help?
Rifqi Fahmi
23,164 Pointsso if it's viewport width is 1200. In media query if it want to take effect on screen width 1200 or more narrowly I must set the code like this : @media (max-width: 1200px) {} ???
Rifqi Fahmi
23,164 PointsI want to set the pixel in media query
Shezan Kazi
10,807 Pointsif you want screen width 1200 or more you need min-width.
Rifqi Fahmi
23,164 Points@media screen (min-width: 1200px) {} like this?
Shezan Kazi
10,807 Pointsyes. Please read this: http://www.w3schools.com/cssref/css3_pr_mediaquery.asp
It explains it very well.
Shezan Kazi
10,807 PointsShezan Kazi
10,807 PointsHi,
what exactly are you trying to achieve?