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 trialKyle Enslin
1,421 PointsSometimes my works works, then it doesn't, then it does after I've deleted it and re-entered it.
This is more a statement just to see if anyone has experienced the same problem. Sometimes I'll enter a rule exactly the same as Nick, save and refresh the website and nothing will happen (the rule won't be executed). I'll try find my mistake by checking over and over and find nothing. So I delete the rule, type it again, save and refresh and all of a sudden it works.
10 Answers
Ted Sumner
Courses Plus Student 17,967 PointsHere is my fork snapshot: https://w.trhou.se/ac2l9alkh2 Click the upper right link (I forget what it says) to open a workspace you can edit.
Ted Sumner
Courses Plus Student 17,967 PointsFirst error: the class is social-icon in the html and social_icon in the css.
Kyle Enslin
1,421 PointsThanks. I changed it to social-icon but the images still don't re-size. I even tried to re-size it further by making it 5px by 5px instead of 20px by 20px and still there's no change.
Ted Sumner
Courses Plus Student 17,967 PointsIt started sizing it for me. Make sure the classes are exactly the same. Try copy paste.
Ted Sumner
Courses Plus Student 17,967 PointsYour profile photo class in html is Profile-photo. In your css it is profile.photo. Remember that this is case sensitive. They have to match exactly.
I am going through your list and looking at the applied css with the Chrome inspect element feature. That tells me exactly what is going on. If there is no style applied from the css to one element, you have look at the classes. They are not linked up for some reason. Find that reason. If there is a line, there is later styling overriding what you have done.
Keneque Thomas
4,147 Pointslaunch a new workspace
Kyle Enslin
1,421 PointsI'm not sure what the problem is. I'll add a rule and it will work. Then I'll add another rule and everything messes up (even the previous rule I added). I have no idea why it does that.
Keneque Thomas
4,147 PointsSometimes the previous rule should remain valid after you added the new one
Ted Sumner
Courses Plus Student 17,967 PointsIt is probably because you have an error in your code, but you need to post an example (the entire code) for us to tell you.
Ted Sumner
Courses Plus Student 17,967 PointsPlease update your code with proper formatting. Double space between your text and the ```. The language should immediately follow the ``` like this: ```css. The code quote starts on the next line. Close the quote with three more ` on a new line below the code. Open a new quote for every different language.
Ted Sumner
Courses Plus Student 17,967 PointsAlso, are you careful to save your changes and update your preview each time?
Kyle Enslin
1,421 PointsAfter I add a rule I press CTRL+S. I then go to the webpage and click "refresh" and either things go right, but mostly they go wrong. I've posted my code below. My CSS code didn't post as well as my HTML code. Is this OK? My apologies, I'm new to this.
Kyle Enslin
1,421 PointsLink posted below
Ted Sumner
Courses Plus Student 17,967 Pointsdoes the code in this snapshot work for you? If not, what is the issue?
Kyle Enslin
1,421 PointsFor the most part it works. Here are some of the issues:
- White line above the header (this went away then came back after entering more rules)
- nav elements not inline or have a font-weight of 800 (these were inline but reverted back after entering more rules.)
- The h1 and h2 elements (Name and nav elements) are not properly centered)
- .social.icon's not resized to smaller (ie: 20px by 20px)
- The profile photo on the "About" page is meant to be round. It's still square.
- The profile photo is not centered
Ted Sumner
Courses Plus Student 17,967 PointsI cannot help you troubleshoot intermittent problems unless there is a fork with the problem.
Kyle Enslin
1,421 PointsKyle Enslin
1,421 PointsHi Ted,
You were correct. My classes were the issue. Everything is working perfect now.
Thanks so much for taking the time to go through my work and correcting me! I really appreciate it!
Kind regards,
Kyle
Ted Sumner
Courses Plus Student 17,967 PointsTed Sumner
Courses Plus Student 17,967 PointsPlease be sure to vote up answers that you found helpful and mark what you considered to be the best answer with the best answer button.