0

How can I let the <a> tag vertical center to the <footer> tag?

This below is my css:

.header-article-list a {

    width:50%;
    color: #000000;
}

.header-article-list .prev-btn {


   float:left;

}
.header-article-list .next-btn {

    float:right;
}

It did not let the <a> tag vertical center to the <footer> tag.

This is the <footer> in browser:

enter image description here

This is the <a> tag in browser:

enter image description here

This is the <span> tag:

enter image description here


EDIT

I set css to below:

.header-article-list a {

    overflow:hidden;
    width:50%;
    color: #000000;
}

.header-article-list .prev-btn {


  /** float:left; **/

}
.header-article-list .next-btn {

  /**  float:right;**/
}

Get the below effect:

enter image description here


EDIT-2

There is text-align:center inherit from header-article-list, I uncheck it in browser:

enter image description here

user7693832
  • 6,119
  • 19
  • 63
  • 114

2 Answers2

0

You can use this code in css:

footer {
background-color: #FFF;
position:fixed;
bottom: 0px;
width: 100%;
text-align: center;
}

HTML:

   <footer align="center">
    <a href="#">March 25, 2</a>
   </footer>

You can show the example here:http://jsfiddle.net/9yNT3/3/

Feras Al Sous
  • 1,073
  • 1
  • 12
  • 23
0

If it's inline you can just add text-align: center; to the parent <footer>.

If it is display:block, give it a width and add margin:auto; for horizontal centering.

Kathara
  • 1,226
  • 1
  • 12
  • 36