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

Adding pages to a website, challenge. "Select the image and set it to be a block element" wont recognize my code

Everytime I add the code it will not allow me to move forward.

<section> <img src="img/gratt.png" alt="profile-photo" class="profile-photo"> <p> Hi, I'm Bob Romea, proud owner of Bob Romea Roofing and Contracting. I was born and raised in the great city of Pittsburgh.</p> <p>more background to Bobs story here</p>

  </section>

this is all the further I can get without screwing it up.

2 Answers

I believe that when it's telling you that it should be a block element, it is saying to set its display to block using CSS like so:

.profile-photo {
  display: block;
}

yes but how do I write that in html form because the challenge doesnt allow me to write anything in css. Maybe this is a very stupid question or a simple rule I must have missed earlier on.

<section> <img src="img/gratt.png" alt="profile-photo" class="profile-photo"> <p> Hi, I'm Bob Romea, proud owner of Bob Romea Roofing and Contracting. I was born and raised in the great city of Pittsburgh.</p> <p>more background to Bobs story here</p>

    .profile-photo {

display: block; } </section>

You may want to post your entire code or post the link to the challenge itself. Remember to use the backtick (on the same button as ~ generally) and format it like so (with line breaks between text and code, and the backticks on their own line):

'''

//PASTE CODE HERE

'''

Do not use the single quote character as I have done. I used the single quote because it resembles the back tick and won't render on the screen as code so I can show you the formatting.

      <section>
        <img src="img/gratt.png" alt="profile-photo" class="profile-photo">
      <p> Hi, I'm Bob Romea, proud owner of Bob Romea Roofing and Contracting. I was born and raised in the great city of Pittsburgh.</p>
      <p>more background to Bobs story here</p>
.contact-info {
  list-style: none;
  padding: 0;
  margin: 0;
  font-style: 0.9em;
}
     </section>    

Jared, just post a link to the challenge itself i.e. the URL at the very top when you are on the challenge because that code is just not correct at all, I'm afraid.