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
    Aug 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Text not centering

    I have a table, that one of the td's looks like this:
    <td colspan='2'><span style='text-align: center; font-weight: bold; font-size: medium;'>Where to go now?</span></td>

    The text comes out bold, and medium, but not centered. The URL is:
    http://www.lyricslist.com/lyrics/art...rey_mariah.php
    But I warn you, it's a long page and the text is at the bottom!

    Dotan Cohen

  • #2
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    Try moving the style attributes to the parent td and ditching the span.

  • #3
    Regular Coder
    Join Date
    Nov 2004
    Location
    The Netherlands
    Posts
    551
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Span is an inline element. If you want to center text try it a paragraph, paragraph is a block element.
    Code:
    <td colspan="2"><p style='text-align: center; font-weight: bold; font-size: medium;'>Where to go now?</p></td>
    Or just do what Bill posters said
    CATdude about IE6: "All your box-model are belong to us"


  •  

    Posting Permissions

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