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

HTML How to Make a Website Responsive Web Design and Testing Adjust the Profile Page and Header

Profile picture margin values have no effect after float: left?

My profile picture margins have no effect after I float it to the left.

Screen grab below.

screen grab

Damien Watson
Damien Watson
27,419 Points

Hi Rory, you will need to supply relevant css/html if possible. Check the Markdown cheatsheet for how to present.

What are you applying the margins too?

2 Answers

I solved it...

Values in a declaration for 'img.profile-picture' were overriding any margin values I was trying to put in a declaration for '.profile-picture'

I changed removed the 'img' from the declaration higher in the CSS so that both declarations were for the same class '.profile-picture'.

Thanks for your replies.

Damien Watson
Damien Watson
27,419 Points

Great, glad you solved your problem. Just remember the magic quote when it comes to problem solving: "Code (not a picture) tells a thousand words".

nico dev
nico dev
20,364 Points

Hi Rory,

I especially would like to ask you if you could and would like to share your code and explain how you solved it, as I'm stuck with almost exactly the same issue.

I'll open a question about it, but if you pass by, and would still like to, I'd really appreciate your sharing your code!

Thanks!