immanuelx2 Posted July 7, 2007 Share Posted July 7, 2007 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! Quote Link to comment https://forums.phpfreaks.com/topic/58809-3-phrases-on-the-same-line-please-help/ Share on other sites More sharing options...
Philip Posted July 7, 2007 Share Posted July 7, 2007 Try using a span on the next button: <span class="right">NEXT</span> <p class="left">PREV</p> <p class="center">1 2 3</p> If you don't use a span, the text-align will automatically break the line after the centered text. Quote Link to comment https://forums.phpfreaks.com/topic/58809-3-phrases-on-the-same-line-please-help/#findComment-291783 Share on other sites More sharing options...
soycharliente Posted July 7, 2007 Share Posted July 7, 2007 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> Quote Link to comment https://forums.phpfreaks.com/topic/58809-3-phrases-on-the-same-line-please-help/#findComment-291914 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.