SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: CSS Table Help

  1. #1
    SitePoint Member
    Join Date
    Nov 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS Table Help

    Using a Java framework, I'm generating a table dynamically. The problem is that the table headers are being created like this:

    HTML Code:
    <th class="columns"><table border=0 cellspacing=0 cellpadding=0 align="center"><tr><td>something in here</td></tr></table>
    I am able to get the class "columns" passed to the table headers, but I have no way of manipulating or aligning the "something in here" content.

    Is there a way I can manipulate the table and/or td elements inside that th element using CSS?

  2. #2
    SitePoint Member
    Join Date
    Nov 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello harly44,

    try <td><span class "blabla">your text</span></td>

    this is just an example with your "blabla" defined in your css:

    e.g. .blabla {
    font-color: #FFOOFF;
    font-size: 12pt;
    }
    use . for class or # for id.

    I hope it helps

    bongo

  3. #3
    SitePoint Member
    Join Date
    Nov 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problem is I have no way of editing this part of the html:

    HTML Code:
    <table border=0 cellspacing=0 cellpadding=0 align="center"><tr><td>something in here</td></tr></table>
    That part is automatically generated by the Java framework. The only part I can edit is the th element that surrounds that table. I was wondering if I could create a CSS class for the th that would be able to override the table's styling.

    For example

    .columns {
    styling in here;
    }

    .columns table {
    styling in here;
    }

    .columns table td {
    styling in here;
    }

    I'm not sure if that's possible or not. Bottom line is I need to left justify the column headers and that table is being created with align="center".


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
  •