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 trialChuck Freeburg
591 PointsCenter is not so center...
i did
html {text-align: center;}
Long story short the text wasn't all centered the same. Any reason?
Chuck Freeburg
591 Pointswhoops... i posted answer instead of reply.. going total noob here. ~
Well i guess one line in relation to another looked as if it's center point was somewhat different.
Jesse Richard
1,899 PointsWhat course is it in and what does the html look like?
Chuck Freeburg
591 Pointshttp://teamtreehouse.com/library/how-to-make-a-website/css-cascading-style-sheets/center-the-wrapper
my code was similar to theirs without images.
2 Answers
Jesse Richard
1,899 PointsA quick fix is to replace the html selector with a *. The * will apply the styling to all elements. Everything should be centred in it's respective wrapping element.
If there are individual elements that don't appear centred they likely have different dimensions, padding, margins, etc.
I'd start by using a * to see what happens and then work down to the individual elements.
*{ text-align: center; }
Chuck Freeburg
591 PointsAh.... I think i got it figured out!
Long story short... It was an unordered list with invisible bullet points which off-centered it. But made it visually appear center with the words from another list who's bullet points were all the way left on the screen.
p.s. thanks for the help
Jesse Richard
1,899 PointsJesse Richard
1,899 PointsWhat do you mean it wasn't all centred the same?