Dynamic Content Destroying my Table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dudedkoz
    New Member
    • Aug 2006
    • 4

    Dynamic Content Destroying my Table

    Greetings, I am writing a skeleton for a new site that I just started, and I've hit a wall.

    Basically I want two types of links for my menu bar, and they work just fine the way they are written, so I'll spare you all the irrelevant code.

    My table basically looks like this (note: this is simplified):

    <th><span><a> </a></span></th>

    With each Table Header cell being dynamically created via a PHP Script that accesses a mySQL Database.

    I dynamically give each <span> a class, either "menu" or "menuselect ed." Based on which link is clicked, I change the <span> class to adjust for the new color/style scheme. For instance:

    x = document.getEle mentById(ID);
    x.className = 'menuselected'

    The change works fine, but my <TH> seems to collapse on itself. The border for it disappears, and the cell shrinks to the text, whereas usually I have display: block; width: 100%; for the <a> tags.

    Any idea as to why the Table Cells are collapsing around my <span> class changes?

    I can post more code if need be, and this is 50/50 CSS/Javascript question, so I wasn't sure whether to ask it here or in the javascript forum.
    Thanks so much, I am really at a loss.
    -Adam
  • dudedkoz
    New Member
    • Aug 2006
    • 4

    #2
    Grrrrr...never mind, I stupidly had nonunique IDs....so what I thought was being changed....wasn 't. Bah. Thanks anyways =)

    Comment

    Working...