Jump to content

Recommended Posts

Hi, im trying to get my pagination links to show up organized like so:

 

PREV              1 2 3                NEXT

 

with the PREV floated left and the NEXT floated right, while the 1 2 3 are text-align: center'd... How should I go about it?

 

This is what I have come up with and it did not work:

 

.left {float:left;}
.right {float:right;}
.center {text-align:center;}

<p class="left">PREV</p>
<p class="center">1 2 3</p>
<p class="right">NEXT</p>

 

any help is appreciated!

Link to comment
https://forums.phpfreaks.com/topic/58809-3-phrases-on-the-same-line-please-help/
Share on other sites

CSS:

.floatleft { float: left; }
.floatright { float: right; }
.left { text-align: left; }
.right { text-align: right; }
.center { text-align: center; }
.w_33 { width: 33%; }

 

HTML:

<div>
<div class="floatleft right w_33">PREV</div>
<div class="floatleft center w_33">1 2 3</div>
<div class="floatleft left w_33">NEXT</div>
</div>

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.