SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    May 2005
    Posts
    297
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can this text and image be aligned any better?

    In opera I get my desired look, but in firefox and IE you can see the text and image aren't exactly aligned. Is it possible to make it a little neater?

    Here is my html for that column:
    HTML Code:
    <td class="column2" width="37%" valign="top"><img alt="" src="/customers/images/expired.gif" align="middle" /> <b><font color="#df0000">Expired: {$expiry_date}</font></b></td>
    And the css used:
    Code:
    .column2 { 
    	margin: 0;
    	padding: 5px;
    	text-align: left;
    	background-color: #cbcbcb;
    	border: 0;
    	vertical-align: middle;
    }
    Thanks

  2. #2
    SitePoint Addict
    Join Date
    Feb 2004
    Posts
    291
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Have you tried splitting the cell into two cells, so that the image and text are in seperate cells?

    Code:
    <td class="column2" valign="top" width="37%"><img alt="" src="/customers/images/expired.gif" align="middle"></td><td><b><font color="#df0000">Expired: {$expiry_date}</font></b></td>

  3. #3
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think it's because of that little icon that you are using, .... see if this 'vertical-align: bottom' article helps.
    http://meyerweb.com/eric/css/tests/css2/sec10-08b.htm

    Nadia


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
  •