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 trial
Matt Freeman
3,990 PointsBegginer i need off help
really stuck on a code challenge: Implementing Media Queries could someone take some time and help me through it.
I cannot carry on at the the moment please leave a comment and ill get back tomorrow.
Thanks.
6 Answers
Iban Dominguez
17,973 Pointsyou need to close the curly braces for selector, example
img {
margin: 2%;
width: 100%;
}
Iban Dominguez
17,973 PointsHi Matt,
I 've just earned that bagde, Describe your problem and I will try to solve it.
Cheers, Iban
Matt Freeman
3,990 Pointscheers for replying Iban, its the first task i'm looking at it and my mind is going blank, i know what i have to put in and where to put it its just i cant see what i'm doing wrong.
Iban Dominguez
17,973 Pointscopy and paste your code
Matt Freeman
3,990 Pointsthis never works for some reason when i ever i try to paste the code it doesnt past the right code.
Iban Dominguez
17,973 Pointsindent the code 4 spaces or hit tab then it will automatically treat it as code, try again!
Matt Freeman
3,990 Pointsimg { margin: 2% 0; width:
Iban Dominguez
17,973 Pointsnot worries!
Matt Freeman
3,990 Pointsstill struggling on other bits but could i get your help in the futre ??
Iban Dominguez
17,973 Pointsyeah man, just drop your code and I'll be happy to help!
Matt Freeman
3,990 PointsJust quickly, how did you come across that number ?
Iban Dominguez
17,973 Pointsit was just an example
Matt Freeman
3,990 Pointsah ok but how would you come across that number ?
Iban Dominguez
17,973 Pointsin this example 100% is relative to the width of its parent element.
Example:
<div style="width: 300px;">
<div style="width:50%;">Im the child div</div>
</div>
In this example the child element (Indented code) will have a final width of 150px (50% of 300px)
So that pretty much how I came across with that number
got it? hope it helps
Cheers
Matt Freeman
3,990 PointsMatt Freeman
3,990 Pointsah cheers buddy !! thanks for the help ! =D