SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2005
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Nesting Tables Alters Text Formatting

    I've noticed that if I nest tables two or more deep, the text inside the nested table turns to bold as if the text is a header. I do not want the text bold.

    Any solutions? Thanks!

    <table width="352" height="130" border="2" cellpadding="0" cellspacing="0">
    <tr>
    <th scope="col"><table width="122" height="58" border="2" cellpadding="0" cellspacing="0">
    <tr>
    <td scope="col"><p>this text is bold </p>
    </td>
    </tr>
    </table>
    </th>
    <td scope="col">this text is not bold </td>
    </tr>
    </table>
    There are no dead atheists.

  2. #2
    Carpe Diem = Fish of the Day fisherboy's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I haven't used tables for some time but I think your problem is the position of </th>. I think the browser is going to bold everything between the <th> tags as it thinks any item in there is a header and needs to be bold.

    As your table has no content inside the <th> tags, do you need them?
    fisherboy
    Web Site Design

  3. #3
    SitePoint Zealot
    Join Date
    Nov 2005
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If I get rid of them the nested table goes away. There is the text "this text is bold" in the nested table.
    There are no dead atheists.

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The default rendering of header cells (TH) uses bold. Nest your inner table inside a TD instead.

    Better yet, don't abuse tables for non-tabular information.
    Birnam wood is come to Dunsinane

  5. #5
    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)
    Are you using Dreamweaver? In the insert table dialogue box, you must have the checkbox ticked to use table headers. As Tommy mentioned these get written as bold text. Undo the checkbox next time you use the dialogue box and it will 'stick' when you need to use it again.

    Nadia

  6. #6
    SitePoint Zealot
    Join Date
    Nov 2005
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the help. I have had problems with DreamWeaver. Upon reloading the software, the bold problem went away. Checking and unchecking the box was not changing the font.
    There are no dead atheists.

  7. #7
    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)
    Quote Originally Posted by sellthishouse
    Checking and unchecking the box was not changing the font.
    That checkbox means whether you want to use a <th> in your table markupl
    <th> is a heading so is written as a bold font. If you have it unchecked, you should not see a <th> in the table code at all.

    Which version of DW are you using? If it's the latest one, have you updated to 8.0.2?

    Nadia

  8. #8
    SitePoint Zealot
    Join Date
    Nov 2005
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    MX2004 is what I am using.
    There are no dead atheists.

  9. #9
    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)
    Here's an example of the insert table dialogue box.
    http://dreamweaverresources.com/forum/dw_tables/

    the first shows No headings to be used and the 2nd that a header row is to be used at the top of the table.

    Not sure if it helps you any though

    nadia

  10. #10
    SitePoint Zealot
    Join Date
    Nov 2005
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes it does, thank you.
    There are no dead atheists.


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
  •