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 CSS Basics (2014) Understanding Values and Units Percentages

Sandeep Singh
Sandeep Singh
3,582 Points

text-alignment

Hi, i am facing a problem in text-alignment . The alignment of header' , footer's and list item are different. Text of header and footer are looking in center of the page but the text of list item's which is in the middle of the page are bit right side than header and footer's text. I have used wrapper technique as well to make all the the text in the center of the page but its not working.

Thanks

2 Answers

Ezra Siton
Ezra Siton
12,644 Points

You must add code (codepen or workspace) its imposibble to know "why" without code.

Inspect styles: https://developers.google.com/web/tools/chrome-devtools/inspect-styles/

Anyway more specific wins. Check if this is your case https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity

Jamie Reardon
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Jamie Reardon
Treehouse Project Reviewer

As Ezra said, but from what I read, it sounds like you have the default styling on your ul/ol element still intact.

Use this piece of code in your CSS to see if it removes that and perfectly centers the content in line with the rest.

Remember to replace the element selector that matches your element in your html, e.g. if you have an unordered list (ul) use the ul tag in the css as the selector, vice versa for ordered list (ol).

ul {
margin: 0;
padding: 0;
}