SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2001
    Location
    m
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy problem with text alignment in table


    can anyone help me?

    I have a row splitted into 2 cells, the first cell is exactly this size of my logo, and in the next cell i would like to inlude a text, that would be right next to it, but instead the text comes in the center of the cell$@%%@#%@

    the table is 700px wide, and this is my row:

    Code:
    <tr> 
          <td height="60" width="220"><img src="logo.gif" width="220" height="60"></td>
          <td height="60" width="480">
            <div align="left">Text Comes Here</div>
          </td>
        </tr>

    what's wrong???

    Thanks!

  2. #2
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <td height="60" width="480" align="left">
    Text Comes Here
    </td>

  3. #3
    SitePoint Zealot
    Join Date
    Dec 2001
    Location
    m
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it doesn;t work also, it's still in the center...

  4. #4
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this

    <table width="700" border="1">
    <tr>
    <td width="220">Default</td>
    <td width="480" style="text-align:left">Left</td>
    </tr>
    <tr>
    <td style="text-align:center">Center</td>
    <td style="text-align:right">Right</td>
    </tr>
    </table>

  5. #5
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK, now I know why <td align="left"> isn't working
    If you have a style definition (in <style> inside <head>, or linked stylesheet) for td, then the html attribute is overridden


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
  •