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.

CSS

Caspar Claessen
Caspar Claessen
9,060 Points

center content in footer

Dear fellow students,

I have the following question: Currently I am trying to build my own first website, but I cannot seem to get the footer content centered. Here is my code for my footer. What's the CSS I should use?

<footer class="main-footer">

    <a href="https://www.facebook.com/Awearness-1883816761894408/?ref=aymt_homepage_panel">
      <img src="C:\Users\User\Documents\Awearness-img\fblogoawearness.jpg" alt="" class="social-icon">
    </a>
    <a href="https://www.instagram.com/awearness.nu/">
      <img src="C:\Users\User\Documents\Awearness-img\instalogoawearness.jpg" alt="" class="social-icon">
    </a>
    <span>&copy;Awearness</span>

</footer>

Also I sometimes get strange low indents in between my social icons.

Looking forward to a reply!

1 Answer

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 90,705 Points

Hi Caspar,

You need to select the footer element with CSS and use the property that aligns text content of an element. Remember with CSS text content refers to any content that lives inside a containing element. Remember to give your element a fluid width that matches the rest of your styles :)

Caspar Claessen
Caspar Claessen
9,060 Points

Thanks for the answer Jonathan! But I still have the following problem. When I use the align context element, I get the following (X is content, in this case an image).

X_X_

There appear low indent marks. Why is this? Looking forward to your answer.