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

CSS CSS Foundations The Box Model Floats

CSS Foundations: Floats Challenge task 3of4 set p width.

I have tried several different ways to try to make the width: 70%; valid. in the paragraph where I am to float it and give a width of 70%. It keeps telling me to check the width property in my CSS. I have tried adding width properties in both px and percentages all the way up to the html container, but it has no effect. I have selected the element, added the class and tried the class alone. In case content collapse was affecting it, I tried overflow, clear and set the clearfix to match the classes in index.

I will add screen shots as soon as I learn how. code mirror

1 Answer

Laura Cressman
Laura Cressman
12,548 Points

Hi Chris, Did you target the paragraph with the class "badge-desc" specifically? Without seeing your code, my guess it is it could be some bug, like forgetting a semi-color or a closing curly braces, or perhaps you are targeting all paragraphs instead of just the ones with the badge-desc class. In my experience, sometimes the errors the Code Challenges throw aren't necessarily related to what's going on. I tried this though and it worked. Let me know if this helps! Wishing you sunshine, Laura :)

.badge-desc {
     float: left;
     width: 70%;
}

Thanks Laura,

I don't know if you clicked the link to see all the extra code I had added as it kept rejecting me. I deleted it all down to like you presented and it worked fine. I originally started out like that but with p in the element since there was only one in the index. It got ugly real fast.