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 to centre text horizontally and vertically

This isn't a great example - but this is supposed to say 'Around The World'. How do I break it down into say three different lines?

http://tinypic.com/r/2u9tm35/5

The 3 words inside the circle? Not sure if this approach is correct but you can try adding a br tag after each word.

<p>Around<br />
The<br />
World</p>

<br> tags aren't supposed to be used for presention, use CSS for that.

The br element represents a line break. br elements must be used only for line breaks that are actually part of the content, as in poems or addresses. br elements must not be used for separating thematic groups in a paragraph.

source: http://html5doctor.com/element-index/

2 Answers

Simple, set the width of your element:

<div>Around the World</div>

div { width: 50px; }

I would set width of p element and text-align:center;