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 trialrajbee
6,657 PointsHow do you see the exact size of an element when using relative sizing ?
An element has a width of 60% and could be nested inside divs whose size may be relative to body. How do you see the exact size in pixels of the element ?
1 Answer
Gunhoo Yoon
5,027 PointsIf you are using Chrome, open up Chrome dev tool with F12 key.
Something will pop up from bottom or right side of your screen.
Click arrows to expand what it contains.
Traverse through your desired element.
Look to your bottom right side of the screen.
There's another square box, from there find Computed tab.
You will see a box model which tells you size of content, padding, border, margin in px.
If you further scroll down within your 'computed' tab, you will see all the CSS properties affected.
Also, IE and Firefox has similar tool which both can be opened up using F12.