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 Introduction to HTML and CSS CSS Fundamentals CSS Box Model

css code not altering web image https://w.trhou.se/fta3k7jh8p

In styles.css line 15 "#intro img{

height and border commands not changing webpage.

Benjamin Joiner
Benjamin Joiner
303 Points

How do I post a link to my workspaces code?

2 Answers

Rohald van Merode
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Rohald van Merode
Treehouse Staff

Hi thomas ethridge 👋

The CSS rule you wrote there is completely correct 💯 The reason why the styles are not shown though is because the element you're trying to select with the #intro img selector doesn't exist.

If you have another look at the carbonara.html file and see how the elements are structured you'll notice that the img is not a child element of the #intro div as shown in the video but are siblings instead:

<div id="intro">
  <p>This easy pasta sauce will cook in about the same time it takes to cook some</p>
</div>
<img src="img/carbonara.jpg" alt="Spaghetti Carbonara on a white plate on a grey marble tabletop" />

If you move that img tag in between the <div id="intro"></div> tags instead your styles should be applied as expected 😃

<div id="intro">
  <img src="img/carbonara.jpg" alt="Spaghetti Carbonara on a white plate on a grey marble tabletop" />
  <p>This easy pasta sauce will cook in about the same time it takes to cook some   </p>
</div>

I hope this helps to get you going again! 😄

Benjamin Joiner
Benjamin Joiner
303 Points

How do we get a link to our workspace so we can ask the community a question? Looking for the answer...

thank you!!