SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2005
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Prev Next Navigation

    I have a navigation bar where I want the previous link to be to the left and next to be aligned to the right. Here is the code:

    <div class="pagenavbar clearfix">
    <a href="32" class="pagenav_prev">
    &lt; Previous
    </a>
    <span class='pagenavspacer'>&nbsp;&nbsp;</span>
    <a href="29" class="pagenav_next">
    Next &gt;

    </a>
    </div>
    and here is the css:

    .pagenavbar {
    width: 100%;
    }

    .pagenav_prev {
    float: left;
    }
    .pagenav_next {
    float: right;
    }
    When it prints out the next link is on a line lower than the previous link. Any ideas how I can style this?

  2. #2
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't float the right link right. Give the container a text-align: right instead and just float the left link left. Then you shouldn't need the clearfix on it either.

  3. #3
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    And you don't need that spacer either.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •