Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2005
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Center text in table

    I'm just trying to center the text in the title cell at the top of this table:

    Code:
    <!-- BEGIN [ringtitle] code -->
      <table border="0" style="border: 2px ridge #990033; width: 482px;">
        <tr><td style="background: silver"><table style="width: 482px;" cellpadding="5" border="0">
        <tr>
        <td colspan="3" style="border: 2px ridge #990033; width: 134px; background: #000000;"><p style="text-align: center; margin: 0">
        <a href="[cgiURL]/home.pl?ringid=rollersports;siteid=[siteid]"
    target="_top" style="color: #ffffff; font: bold 18pt arial, helvetica, sans-serif">[ringtitle]</a></p></td>
        </tr><tr>
        <td border="0" style="width: 134px; background: #990033">
        <p style="text-align: center; margin: 0">
        <a href="[cgiURL]/prev.pl?ringid=rollersports;siteid=[siteid]"
    target="_top" style="font: bold 12px arial, helvetica, sans-serif; color: #ffffff;">Previous Site</a></p><br>
        <p style="text-align: center; margin: 0">
        <a href="[cgiURL]/prev5.pl?ringid=rollersports;siteid=[siteid]"
    target="_top" style="font: bold 12px arial, helvetica, sans-serif; color: #ffffff;">Previous 5 Sites</a></p><br>
        <p style="text-align: center; margin: 0">
        <a href="[cgiURL]/rand.pl?ringid=rollersports;siteid=[siteid]"
    target="_top" style="font: bold 12px arial, helvetica, sans-serif; color: #ffffff;">Random Site</a></p>
        <br>
        <p style="text-align: center; margin: 0">
        <a href="[cgiURL]/list.pl?ringid=rollersports;siteid=[siteid]"
    target="_top" style="font: bold 12px arial, helvetica, sans-serif; color: #ffffff;">List Sites</a></p>
        </td>
        <td border="0" style="width: 214px; background: #ffffff;"><img src="http://www.rollersports.ca/images/wbackgrnd.jpg" width="213" height="199"></td>
        <td border="0" style="width: 134px; background: #990033"><p style="text-align: center; margin: 0">
        <a href="[cgiURL]/next.pl?ringid=rollersports;siteid=[siteid]"
    target="_top" style="font: bold 12px arial, helvetica, sans-serif; color: #ffffff;">Next Site</a></p><br>
        <p style="text-align: center; margin: 0">
        <a href="[cgiURL]/next5.pl?ringid=rollersports;siteid=[siteid]"
    target="_top" style="font: bold 12px arial, helvetica, sans-serif; color: #ffffff;">Next 5 Sites</a></p><br>
        <p style="text-align: center; margin: 0">
        <a href="[cgiURL]/search.pl?ringid=rollersports;siteid=[siteid]"
    target="_top" style="font: bold 12px arial, helvetica, sans-serif; color: #ffffff;">Search Sites</a></p><br>
        <p style="text-align: center; margin: 0">
        <a href="[cgiURL]/stats.pl?ringid=rollersports;siteid=[siteid]"
    target="_top" style="font: bold 12px arial, helvetica, sans-serif; color: #ffffff;">Ring Stats</a></p>
        </td>
        </tr>
        </table></td></tr>
      </table>
      <!-- END [ringtitle] code -->
    it works fine in Netscape 8, but the text left aligns itself when seen in internet explorer. Can someone help me with hopefully a quick fix to this problem.

    Thanks,
    Titanic Fanatic

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Lose the width in this cell
    Code:
    <td colspan="3" style="border: 2px ridge #990033; width: 134px; background: #000000;"><p style="text-align: center; margin: 0">
        <a href="[cgiURL]/home.pl?ringid=rollersports;siteid=[siteid]"
    target="_top" style="color: #ffffff; font: bold 18pt arial, helvetica, sans-serif">[ringtitle]</a></p></td>
    Also why are you using inline styling? Why don't you use an embedded or external stylesheet?

  • #3
    New Coder
    Join Date
    Jul 2005
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    That Worked

    Thanks, that worked.

    The reason I'm using inline for this one is that it going to be webring and this is the code that people are going to have to put in their page for the ring. I don't want to add extra steps for these people just to add external css for my webring.

    Thanks again,
    Titanic Fanatic


  •  

    Posting Permissions

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