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

Daniel Lynch
PLUS
Daniel Lynch
Courses Plus Student 658 Points

Something keeps going wrong- text disappearing for no reason

Twice in one lesson I altered the style using the grid system on the Smells Like Bakin' project and entire chunks of text disappeared. Earlier I screwed up the indentation part of the project and I had to re-indent things. Could this have messed up my file because it seems to keep happen over and over again EVERY time I go to edit the goddamn page! Am I doing something wrong here because I had to retrack my progress a second time now

Indentation shouldn't change anything, If this happens again, post your code in codepen or pastebin, it will make it very easy for us to help you.

Daniel Lynch
Daniel Lynch
Courses Plus Student 658 Points

Cheers man. Thanks. I appreciate the assistance and I'll do just that.

Daniel Lynch
Daniel Lynch
Courses Plus Student 658 Points

Damnit! Now there's a NEW problem! (which my have been the same problem before I dunno anymore) It keeps getting reset back to the original format as it was BEFORE I added the grid formats to all the text contained within but it still has the margins applied to the page. How do I post my code in codepen or pastebin so I can show you guys exactly what's going wrong? Until I can find out exactly what I've done wrong I can't finish the lesson or move forward onto others. Everytime I reach this point of the lesson something goes wrong yet I'm absolutely certain that I'm typing it exactly as they explain it to us.

http://codepen.io/pen Post your code in the boxes and click save. Your address bar will have the URL to the saved code

3 Answers

Kevin Korte
Kevin Korte
28,149 Points

You could be pushing text outside of it's grid container, and if you have something in the CSS like

overflow: hidden;

than that could be hiding the text when it "overflows" it's container.

It is too difficult to tell without seeing your HTML and CSS but that's what comes to mind.

Daniel Lynch
Daniel Lynch
Courses Plus Student 658 Points

Cheers. I'll keep an eye on that and check it every time I update the code. I don't see how it's overflowing though it's the exact same code as in the lesson.

Matt Campbell
Matt Campbell
9,767 Points

Indenting your code has zero effect on what is output to the page. It's just a formatting practice to help us be able to read the code better and for future developers to read the code. You could right everything one long line as white space is ignored, much like a minified code is. However, if you ever look at a minified file, you'll know why we don't and why we indent and format our code.

As for the disappearing text, take it out of the site's code editor and put it into a document and look at it in your browser. That way you're eliminating refresh errors within your browser or the code editing software online.

In addition, when you're experiencing issues such as this, try putting it in a codepen on codepen.io and linking it here for us to see. That way we can actually diagnose issues and help with seeing something. At the moment, it's all guess work.

Line 15 is missing an equals sign when defining nav class.

Line 23 has a duplicate h1 opening tag, needs to be a closing tag

Code is missing a closing div tag somewhere, you have one more opening div tag than you have closing div tags.

Once you have that sorted, see if you are still having issues :)

Daniel Lynch
Daniel Lynch
Courses Plus Student 658 Points

Unfortunately I'm still having issues but thanks for spotting those bugs with my code. My brother (who's a web designer amongst other things) suggested I keep going with the lesson and see if finishing the code creases out some of the wrinkles in the page. If it's still buggy by then I'll just upload the whole thing in codebin and see if anyone can help.

Debugging is a vital skill to learn. When you have a copy of the files that works correctly, such as you have with the Smells Like Bakin project files, you can easily isolate errors. Copy and paste the entire correct HTML as your code, if that works, then you know the problem is in the HTML. Then revert back to your original HTML, and just copy paste the body. If that works, revert, and copy paste just the first half of the body. Continue this process until you can find the exact lines which are causing the effects.

Learning to isolate the problem like this is a vital skill to learn.

Good luck! :)

Daniel Lynch
Daniel Lynch
Courses Plus Student 658 Points

Cheers Thomas :D. It seems as though I got the file working correctly though, my brother was right, he suggested I continued on with the lesson to iron out a new error and he was right. Thanks again for spotting those bugs, that's going to be a priority from now on. It's easy to make errors without even trying. I'll be sure to double check my work before going onto other lessons from now on.

That's good :)

Yep, it's all a learning process, even when you make mistakes, those are usually the times when you learn the most.

Good luck! :)