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

HTML How to Make a Website Customizing Colors and Fonts Resize Text

Sergei Makarov
Sergei Makarov
13,839 Points

text-align - css-property as reference to all elements?


in the video "Resize Text" we use a css-property text-align for footer element, but actually we don't have any text there instead of within <p> tag. Otherwise it will be applied to all pictures in it also. Does it mean, that "text-align" property is just a convention we use to apply to all elements?

1 Answer

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,252 Points

Yes you can use text-align to center the inner content of all block level elements.

For inline elements you could try using margin values for left and right values. text-align is the name of the property but it can be referred to as content-align as well. :)