Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    May 2017
    Posts
    2
    Member #
    56539

    Align text properly

    Hello everyone,

    I am currently working on a site for personal use. At the footer I have a problem aligning the text properly with the social icons.

    help.jpg

    This is my CSS code:
    .footer {
    position: relative;
    width: 100%;
    max-width: 958px;
    font-family: 'Open Sans', sans-serif; color: #a4d0c4;
    font-size: 14px;
    background-color: #000;
    margin: 0 auto;
    padding-bottom: 10px;
    padding-top: 20px;
    padding-left: 2px;
    text-align: center;
    }
    .footer a{ font-family: 'Open Sans', sans-serif; color: #a4d0c4;
    font-size: 14px;
    text-decoration: none;
    }
    And this is my HTML Code:

    <div class="footer">
    <div class="row">
    <div class="four columns">
    <p><img src="images/logo.png" height='50%' width='50%'/></p>
    </div>
    <div class= "four columns">
    <p>|<a href="#">Home</a>|<a href="#">Portfolio</a>|<a href="#">Contact</a>|</p>
    </div>
    <div class="four columns">
    <a href="---"><i class="fa fa-envelope-o" aria-hidden="true"></i>
    <a href="---"><i class="fa fa-linkedin-square" aria-hidden="true"></i>
    <a href="---"><i class="fa fa-facebook-square" aria-hidden="true"></i>



    </div>
    <hr>
    <div class="twelve columns">
    <p> 2017 -////</p>
    </div>
    </div>
    </div>
    I'd appreciate any help you guys can give me

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    line-height will be the most likely property to give you want you want. Apply it to the footer class (which should be a <footer> tag by the way...that's what it's there for.

    Failing that, you could also use vertical-align: middle on the three divs, although it does tend to work best with inline and table-cell elements.

    https://www.w3schools.com/cssref/try...vertical-align
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Junior Member
    Join Date
    May 2017
    Posts
    2
    Member #
    56539
    Quote Originally Posted by TheGAME1264 View Post
    line-height will be the most likely property to give you want you want. Apply it to the footer class (which should be a <footer> tag by the way...that's what it's there for.

    Failing that, you could also use vertical-align: middle on the three divs, although it does tend to work best with inline and table-cell elements.

    https://www.w3schools.com/cssref/try...vertical-align
    changed it to just <footer> now, thanks!

    It didn't work but then i noticed I still had a specific style for my FA-buttons, and there was an extra padding on there :P


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:09 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com