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 How to Make a Website Styling Web Pages and Navigation Style the Image Captions

Joseph Gardin
Joseph Gardin
4,583 Points

why isnt my images a link? and for some reason when i wrote in CSS #gallery li a p nothing changed.

question in title. heres a link to my workspaces. https://teamtreehouse.com/workspaces/21150242#

The link doesn't exist. You can post your code here using the "Markdown Cheatsheet" link that's right above the button to post your comment. Use three apostrophes followed by the programming language name, your code, and three more apostrophes for closing.

Joseph Gardin
Joseph Gardin
4,583 Points

' ' ' HTML <p>

/******************************* PAGE: PORTFOLIO *******************************/

gallery {

margin: 0; padding: 0; list-style: none; }

gallery li {

float: left; width: 45%; margin: 2.5%; background-color: #f5f5f5; color: #000; }

gallery li a p {

margin: 0; padding: 5%; font-size: 0.75em; color: #ece207; } </p> ' ' '

I'm sorry, I typed apostrophe, but it's actually a grave accent (`). Also, press enter after typing the language name, and before typing the three closing grave accents. I'll take a look at your code in the meantime.

1 Answer

I went through both objectives, because I wasn't sure which one you were trying to do. I'm going to assume it's the first objective, somewhere challenge 4. You are not being asked to select any paragraphs within #gallery's linked list items. Your code is also missing pounds/hashes to specify gallery is an id (perhaps the editor removed them, because I doubt you'd be that far in the challenge without using them).

img{
  max-width: 100%;
}

#gallery{
  margin: 0;
  padding: 0;
  list-style-type: none;
}

#gallery li{
  float: left;
  width: 45%;
  margin: 2.5%;
  color: white;
  background-color: black;
}