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 trialMethee Saengow
5,474 PointsAbout the floated divs' width actual size do not match with the size of 46.5%
Hi, in the video we have specified the size of the floated .resort and .tips classes to be 46.5%
The .resort and .tips classes both have the same div parent with the class named .secondary-content in which the max-width had been prior specified at 960px.
The floated. resort and .tips classes take up the space of 46.5% of the 960px of the parent div. Then it means the size of each floated should be 446.4px but i use the chrome to inspect the 2 floated elements and found that the width of each floated div is only 399.9 px.
Just would like to have some guidance from friends or teacher here:
- Are the width specify to both .resort and .tips relative to div with the class "secondary-content" ?
- Why the width of both floated divs are 399.9px not 446.4 ?
- It seems both floated divs have margin to each other which may make the width not 446.4px
I am very new to css and web design, please help me
Methee S.
Mike Hatch
14,940 PointsHi Methee,
As I don't fully grasp what you're actually asking here I'll continue to Comment rather than provide you an Answer. I will say something, though. It is better to Ask a Question in the Video Questions area. You posted this in the CSS - General area. Try posting your actual code (in Markup form), too.
Also, floats are frustrating for all. Not just for new coders. That's because they are a hack and are being phased out and replaced with newer CSS Technology (Flexbox and CSS Grid). It's still important to learn floats as you'll run into them and it helps knowing some CSS History.
I do hope someone else can help you.
Methee Saengow
5,474 Points@ Mike Hatch
Ohh I see i just noticed that I posted in general Css General area !! I will ask in the Video Question area.
Anyway thanks alot for your comment. Your comment is also very useful
Methee S.
Mike Hatch
14,940 PointsMike Hatch
14,940 PointsWhich video?