Having Some Positioning Problems

Discussion in 'PHP' started by NateJ, Jun 3, 2009.

  1. #1
    I'm having some problems with positioning rows.

    For example:

    Place | Username
    1st | NateJ
    2nd | RandomUser

    and so on...

    The above PHP gives out the input i wanted however, the positioning isn't quite right:

    [​IMG]

    Anyone know how to fix this problem?

    Any help is appreciated.


    Thanks,
    NateJ
     
    NateJ, Jun 3, 2009 IP
  2. dean5000v

    dean5000v Peon

    Messages:
    201
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    have you sanitized your inputs like username just for a check, and im not quiet sure what u mean by position do you mean like align the text to the middle ?
     
    dean5000v, Jun 3, 2009 IP
  3. xlcho

    xlcho Guest

    Messages:
    532
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I noticed you have a <center> tag inside one of the <td>s. I guess you wanna center the content of the table, but the <center> tag is not properly placed and written, furthermore - it's deprecated. Add:
    style='text-align: center'
    Code (markup):
    to your <td>s to center the content. You can also use left or right for the appropriate order (if you don't want the content in the center...).
     
    xlcho, Jun 3, 2009 IP
  4. NateJ

    NateJ Active Member

    Messages:
    240
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #4
    I'm not talking about the alignment of the table, i'm talking about the:

    2
    2
    3

    Where it should be

    1
    2
    3
     
    NateJ, Jun 3, 2009 IP
  5. HorseGalleria

    HorseGalleria Peon

    Messages:
    91
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If there is nothing wrong with the query, then init $pos=0 and replace $pos = $tsel5++; with $pos++;

    Otherwise, define the problem better.
     
    HorseGalleria, Jun 3, 2009 IP
  6. NateJ

    NateJ Active Member

    Messages:
    240
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #6
    $pos++

    will reseult in

    1
    2
    3
     
    NateJ, Jun 3, 2009 IP