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 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Infuriating Mobile tables!

    Dear All,

    I have an issue with a table I am trying to make for my online CV. I have made a table, such as the one below:

    <table>
    <tr>
    <th width="110" class="tdt">Company</th>
    <td class="tdt">BAE Systems - Pinzgauer Devision/Pinzgauer Ltd</td>
    <td rowspan="3" width="75"><img align="right" src="images/thumb-pinz.jpg" alt="" /></td>
    </tr>
    <tr>
    <th class="tdt">Dates of Work</th>
    <th class="tdt">Job Title</th>
    </tr>
    <tr>
    <td class="tdt">08/06-12/07</td>
    <td class="tdt">Student Design Engineer</td>
    </tr>
    <tr>
    <td colspan="3" class="tdt">
    As part of my five year MEng Sandwich course...</td>
    </tr>
    </table>

    And the relevant CSS is:

    table {
    width: 530px;
    border-collapse: collapse;
    }

    th {
    background-color: #333333;
    padding: 2px;
    font-size: 12px;
    font-weight: normal;
    color: #FFFFFF;
    text-align: left;
    border: solid 1px #333333;
    }

    tr {
    color: #333333;
    }

    td {
    border: solid 1px #333333;
    }

    .tdt {
    padding: 2px;
    font-size: 12px;
    }

    img {
    padding: 0px;
    display: block;
    }

    The problem is that I want the border to stay tightly wrapped around the thumbnail image and it to stay in the top right hand corner of the table. This seems to work fine with only a small amount of text is the bottom cell, however, as soon as I put more text into that cell, it moves the thumbnail left leaving blank space!!

    Can anyone please explain to me why the amount of text in the bottom cell seems to change the position of the upper cell without modifying the overall table dimentions?

    Any help would be greatly appreciated.

    Many thanks,

    Mike

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    I assume you haven't added a DOCTYPE at the top of your document. So fix your site with the right doctype!
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm using Dreamweaver CS3, so the doctype is automatically included:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    Is this correct for my application?

    Thanks,

    Mike

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    I'd prefer that, but you'll get some errors on markup validation, and you may need to fix them later.

    btw, in the above, the first line only is the DOCTYPE part and the second one is the html tag.

    PS: I think a table is OK in this case, but I'd recommend you to check why tables for layout is stupid.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    Senior Coder jerry62704's Avatar
    Join Date
    Oct 2007
    Location
    Springfield, IL
    Posts
    1,100
    Thanks
    13
    Thanked 87 Times in 87 Posts
    Your tables are lacking essential tags for accessibility. If you are going to use tables, use them correctly.
    .
    .
    ...and gladly would he learn and gladly teach

    Visit www.LiberalsWin.com for humor and the unique Bush/Obama Approval Polls

  • #6
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by jerry62704 View Post
    Your tables are lacking essential tags for accessibility. If you are going to use tables, use them correctly.
    Yes, thanks! That would be why I'm here!

    What am I doing wrong?

  • #7
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Dear All,

    Just an update on this. This seems to be an IE problem only. Chrome and Firefox display the page exactly as I want it.

    Does anyone have any ideas how I might encourage IE to see my point of view?

    Cheers.


  •  

    Posting Permissions

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