SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Feb 2004
    Location
    america
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Align three links in a row...

    I have a paginating-system on a page with the following buttons:
    "Previous", the pages "1, 2, 3, 4, ..." and "Next". In case the actual page is the first or last page the "Previous" or "Next" buttons won’t show. "Previous" should be on the left, "1, 2, 3, 4, ..." in the center and "Next" on the right. I put each of the categories in a div and they align fine, but they are each one line below the previous. So, I thought I can solve this problem by using span instead of div, but is still have a line break? How can I solve this problem?
    Here is an example:
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <style type="text/css" media="screen">
    .left{
    	float: left;
    	}
    .center{
    	text-align: center;
    	}
    .right{
    	float: right;
    	}
    
    </style>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    
    <body>
    <span class="left"><a href="#">left</a></span>
    <span class="center"><a href="#">center</a></span>
    <span class="right"><a href="#">right</a></span>
    </body>
    </html>

  2. #2
    Ding Fries are Done! inter4design's Avatar
    Join Date
    Mar 2003
    Location
    usa
    Posts
    386
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try changing your styles to something like this:

    and actually if there isnt anything after the .right class in your html code then you dont need the .right class

    Code:
      .center{
      	float: left;
      	margin-right: 5px;
      }
      
      .left{
      	float: left;
      	margin-right: 5px;
      }
      
      .right{
      	float: left;
      }
    DoesItMatter
    - anyone seen my underwear?


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
  •