Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Sergei Makarov
Sergei Makarov
12,728 Points

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

Hello,

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
MOD
Jonathan Grieve
Treehouse Moderator 91,053 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. :)