SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot ricklach's Avatar
    Join Date
    Nov 2004
    Location
    Victoria BC
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Example Ch 10 CSS Tables

    In the example in chapter 10 to Designing without tables you have the tables example. My question is: how do you add css attribltes to UL/LI items within the TD tag. Using your example I tried
    Code:
    table.schedule tbody tr td ul li { font-size: 0.9em; }
    but nothing seemed to happen. Do I have the syntax correct?

    Rick
    Ruby, Ruby when will you be mine

  2. #2
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Seems to work for me when I adjust font sizes:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <style type="text/css" media="screen">
    table.schedule tbody tr td ul li { font-size: 2em; }
    </style>
    </head>
    <body>
    <table class="schedule" width="100">
    <tr>
    <tbody>
    <td>
        <ul><li>test</li></ul>
    </td>
    </tbody>
    </tr>
    </table>
    </body>
    </html>
    Make sure you're assigning the class to the table:

    Code:
    <table class="schedule">
    Unless you mean changing font families or colors, then append to the CSS style rule:

    Code:
    <style type="text/css" media="screen">
    table.schedule tbody tr td ul li 
    { 
    font-size: 2em;
    color:#000000;
    font-family:Verdana, Helvetica, sans-serif;
    }
    </style>
    Ryan Butler

    Midwest Web Design

  3. #3
    SitePoint Zealot ricklach's Avatar
    Join Date
    Nov 2004
    Location
    Victoria BC
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, that worked. I am also experiencing some trouble with borders. They show up in IE but are not visible in Firefox. Is there some hack that will fix this - again, I am using the example from chapter 10 of the book.

    Rick
    Ruby, Ruby when will you be mine

  4. #4
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This works in FF and IE:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <style type="text/css" media="screen">
    table.schedule tbody tr td ul li { 
        font-size: 2em; 
        border:1px solid #000;
        padding:4px;
    }
    </style>
    </head>
    <body>
    <table class="schedule" width="100">
    <tr>
    <tbody>
    <td>
        <ul><li>test</li></ul>
    </td>
    </tbody>
    </tr>
    </table>
    </body>
    </html>
    Ryan Butler

    Midwest Web Design


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
  •