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
  behar
10,800 PointsHow to make text allign from the left?
Quick question about CSS. If i have some tags inside an header element, paragraphs h1s list items etc. If i wanted everything inside of that header element to allign from the left, in one long line of text, how would i do that?
2 Answers
Steven Parker
243,199 PointsThis would be one way:
header * { float: left; }
And depending on what the items are, this may even work better:
header * { display: inline; }
If you showed the actual code, it would be easier to give specific answers that would work for it.
Rich Donnellan
Treehouse Moderator 27,741 PointsOr this:
header { display: flex; }; // defaults to flex-direction: row;
Flexbox is widely supported now. So, you should be OK using it.
Steven Parker
243,199 PointsI tried that, but it doesn't flatten out the items in a list like the other methods do.
Rich Donnellan
Treehouse Moderator 27,741 PointsI guess I misunderstood the question! ¯_(ツ)_/¯
Steven Parker
243,199 PointsOh, but this does:
header { display: flex; } 
header * { display: flex; }