1

I am trying to align the text inside the div tag with the links but I am unable to do it. Please take a look at the fiddle. Images are a little up than the text Page 5 of 6.

<display:setProperty name="paging.banner.full" value='<span class="pagelinks"> <a href="{1}"> <img src="../images/integration/FastLeft.jpg"/> </a> <a href="{2}"> <img src="../images/integration/SlowLeft.jpg"/> </a> | Page {5} of {6} | <a href="{3}">  <img src="../images/integration/SlowRight.jpg"/> </a> <a href="{4}"> <img src="../images/integration/FastRight.jpg"/> </a></span>'/>
        <display:setProperty name="paging.banner.first" value='<span class="pagelinks"> <img src="../images/integration/FastLeft.jpg"/> <img src="../images/integration/SlowLeft.jpg"/>&nbsp | Page {5} of {6} | &nbsp<a href="{3}"> <img src="../images/integration/SlowRight.jpg"/> </a> <a href="{4}"> <img src="../images/integration/FastRight.jpg"/> </a></span>'/>
        <display:setProperty name="paging.banner.last" value='<span class="pagelinks"> <a href="{1}"> <img src="../images/integration/FastLeft.jpg"/> </a> <a href="{2}"> <img src="../images/integration/SlowLeft.jpg"/> </a> | Page {5} of {6} | <img src="../images/integration/SlowRight.jpg"/> <img src="../images/integration/FastRight.jpg"/> </span>'/>

CSS

.pagelinks  {
float: right;
margin-right: 48%;
display: inline-block;
background-size: cover;
background-repeat: no-repeat;
color: #828282;
}

.pagelinks a {
text-decoration: none;
display: inline-block;
background-repeat:  no-repeat;
}

Thanks

JSFiddle

Mike
  • 777
  • 3
  • 16
  • 41

1 Answers1

1

with flexbox:

.pagelinks  {
  display: flex;
  /* vertical centering on flex row content */
  align-items: center;
  /* horizontal centering on flex row content*/
  justify-content: center;
}
Sean Gregory
  • 571
  • 2
  • 10