HTML center text tag

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eMonk
    Confirmed User
    • Aug 2003
    • 2310

    #1

    HTML center text tag

    Code:
    text <center>link</center>
    how can i center the link in a table row & keep the text to its default left alignment? when i try to use the code above it moves the text within the center tag down to the next line. i would like it on the same table row without having to create more tables or splitting them up into two. can this do done?
  • blogman9
    Confirmed User
    • Dec 2005
    • 1261

    #2
    td align="center"
    Adult industry news

    Comment

    • eMonk
      Confirmed User
      • Aug 2003
      • 2310

      #3
      Originally posted by blogman9
      td align="center"
      but that would center the text & link wouldn't it? i just want the link centered in the table row.

      Comment

      • StuartD
        Sofa King Band
        • Jul 2002
        • 29903

        #4
        You can't have something left aligned and something centered....
        the centered item would have no idea where the center is supposed to be.

        The more "text" you have left aligned, the further to the right the "centered" link is going to end up.
        This is me on facebook
        This is me on twitter

        Comment

        • eMonk
          Confirmed User
          • Aug 2003
          • 2310

          #5
          ok, guess i will have to create 2 different tables to do this. one for the text & one for the link. i have to do this more then 60 times though. i was hoping for an easier way to do this.

          Comment

          • warlordx
            Confirmed User
            • Jun 2007
            • 134

            #6
            you can do this using some simple css if you so wish
            Code:
            <html>
            <head>
            <style type="text/css" title="text/css" media="all">
            <!--
            #container {
                 text-align:center;
                   }
            #left {
                 display: inline;
                 float: left;
                   }
            #center {
                 display: inline;
                 }
            #right {
                 display: inline;
                 float: right;
                   }
            -->
            </style>
            </head>
            <body>
            <table>
            <tr>
            <td>
            <div id="container"><div id="left">left text</div><div id="center">center text</div></td>
            </tr>
            </table>
            
            
            </body>
            </html>
            this should work ok for ya give it a whirl
            Trade blog traffic with my Penis enlargement site ..

            Comment

            • eMonk
              Confirmed User
              • Aug 2003
              • 2310

              #7
              i was just going to ask if there was a way to do this with css, thanks warlordx. i'll try that now.

              Comment

              • warlordx
                Confirmed User
                • Jun 2007
                • 134

                #8
                no problemo bud im a code whore lmao speak nice things about me if the cops ever come knocking hehe
                Trade blog traffic with my Penis enlargement site ..

                Comment

                • Deej
                  I make pixels work
                  • Jun 2005
                  • 24386

                  #9
                  i was going to say, Css that shit in there... it may be tricky but it can damn near ALWAYS be done.....

                  Deej's Designs n' What Not
                  Hit me up for Design, CSS & Photo Retouching


                  Icq#30096880

                  Comment

                  • warlordx
                    Confirmed User
                    • Jun 2007
                    • 134

                    #10
                    Originally posted by Deej
                    i was going to say, Css that shit in there... it may be tricky but it can damn near ALWAYS be done.....
                    hell yeah it can just a bit of a fiddle if you cant remember the piece you need but hey there's plenty of css resource sites out there :D
                    Trade blog traffic with my Penis enlargement site ..

                    Comment

                    • StuartD
                      Sofa King Band
                      • Jul 2002
                      • 29903

                      #11
                      First of all, those should be classes instead of ID's if they're to be done again on the page.... secondly, it still won't work unless the divs have widths specified to them as the divs will adjust according to the length of the divs... again, not properly centering it.
                      This is me on facebook
                      This is me on twitter

                      Comment

                      • aico
                        Moo Moo Cow
                        • Mar 2004
                        • 14748

                        #12
                        <td align="center">
                        <div style="width: 500px;">
                        <p align="left"> text </p>
                        </div>
                        </td>

                        Comment

                        • eMonk
                          Confirmed User
                          • Aug 2003
                          • 2310

                          #13
                          i got it to work with css. thanks again warlordx. you rock!

                          Comment

                          • warlordx
                            Confirmed User
                            • Jun 2007
                            • 134

                            #14
                            Originally posted by MUNK
                            i got it to work with css. thanks again warlordx. you rock!

                            no problemo bud
                            Trade blog traffic with my Penis enlargement site ..

                            Comment

                            • eMonk
                              Confirmed User
                              • Aug 2003
                              • 2310

                              #15
                              Originally posted by StuartD
                              First of all, those should be classes instead of ID's if they're to be done again on the page.... secondly, it still won't work unless the divs have widths specified to them as the divs will adjust according to the length of the divs... again, not properly centering it.
                              so replace "id" with "class" and "#" with "."?

                              Comment

                              • StuartD
                                Sofa King Band
                                • Jul 2002
                                • 29903

                                #16
                                Originally posted by MUNK
                                so replace "id" with "class" and "#" with "."?
                                Yup, you got it
                                This is me on facebook
                                This is me on twitter

                                Comment

                                • yumma
                                  Confirmed User
                                  • Jul 2007
                                  • 579

                                  #17
                                  html/css guru here...
                                  naked teens finger bang big ass babes ass fucking

                                  Comment

                                  Working...