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

How do I align the paragraph with the heading?

On my services page, my heading and paragraph are not aligned.

Treehouse link: http://port-80-xx2t3h6fof.treehouse-app.com/services.html Codepen link: http://codepen.io/robbiegsingh/pen/NPMrGB

you've put your code in wrong in codepen

1 Answer

Hi Robbie,

I was unable to find any paragraph elements in your HTML - are you referring to the li elements?

<h3>Our Services</h3>
<ul class="services">
  <li>Sample Service 1</li>
  <li>Sample Service 2</li>
  <li>Sample Service 3</li>
  <li>Sample Service 4</li>
  <li>Sample Service 5</li>
</ul>

By default, the ul element has left padding. Setting this to 0 will align the li text with the h3 heading.

.services {
  /* ... */
  padding-left: 0;
}

Hi Robert,

Yes - I was referring to the li padding! Thanks for the correction.

Robbie