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 trialcraig dsouza
236 PointsHow to find which line the code is on (3mins into the video) referring to finding the image in HTML
About 3 mins in the video she says lets find the code in HTML am new to coding and its my first day, sorry if my question dose not make sense or is stupid, all i see so many lines of code and its kind of confusing to search for something when you dont know what it should say. Can any one help me on how to locate which line the code is on when am searching for it either on the html or css window. Thanks in advance.
4 Answers
Alexander Solberg
14,350 PointsIm a little bit confused by the question, but . . . In the video she is looking for a piece of information attached to an html-element called a "class". She uses this information to locate it in the the styles.css file, where all the styling of html-elements are applied.
in styles.css the code is located at line 65, the hover effect at line 73.
in the html, or index.html, the reference or "class" can be found on line 24.
You can search through your files in the workspace by pressing ctrl+f on windows and I think cmd+f on mac. A search field appears, you can type in what you are looking for.
Prince Canty
2,135 PointsIf I understand your question correctly you are ask how do you know where to look to change hat piece of code. In this particular case shes refering to an image located in the header. Since what you want to change about it is style related you will have to find it in css. If you look at the link where you add the picture you will see a class= "profile-image" .profile-image is the section in the css document you would have to find to change.
Adam Beer
11,314 PointsJust look at the left side, there are the row numbers. But Treasure used the <img> tag specific class property and selected the element. Inside the css file use this. For example.
.profile-image{
//your css code
}
Code
Wrap your code with 3 backticks (```) on the line before and after. If you specify the language after the first set of backticks, that'll help us with syntax highlighting.
```html
<p>This is code!</p>
```
You can use the snapshot function in the workspace and provide the link to that.
Please check these courses. HTML Basics and CSS Basics. Then you will know the HTML and CSS basics. Hope this help.
craig dsouza
236 PointsThank you all for your Help