473,378 Members | 1,384 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 "menuselected." Based on which link is clicked, I change the <span> class to adjust for the new color/style scheme. For instance:

x = document.getElementById(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
Aug 26 '06 #1
1 1313
Grrrrr...never mind, I stupidly had nonunique IDs....so what I thought was being changed....wasn't. Bah. Thanks anyways =)
Aug 26 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Joe Kelsey | last post by:
I want to create dynamic content and use replaceChild to switch out different subtrees. I start with a span placeholder: <span id="replaceMe"></span> Then I use document.getElementById...
6
by: hb | last post by:
Hi, I have a page bill.aspx and its code-behind bill.aspx.cs. On bill.aspx I have: === Select a month: <asp:dropdownlist runat="server" id="lstDate" autopostback="True" /> <br> <asp:table...
3
by: vodafone | last post by:
Hy all I've a little problem. I need to write a dynamic page that render control according to validation status return from previous control validation status. To be clear, I've page that...
1
by: nsvmani | last post by:
Hi, i am trying to get the FileOpen dialogue window as soon as clicked href link I am using IE6 with ActiveX enabled. Just need to get the File Open dialogue window when i click on the HREF links.It...
0
by: Eniac | last post by:
Hi, I've been working on a custom user control that needs to be modified and the validation is causing me headaches. The control used to generate a table of 4 rows x 7 columns to display all...
9
by: pbd22 | last post by:
Hi. This is just a disaster management question. I am using XMLHTTP for the dynamic loading of content in a very crucial area of my web site. Same as an IFrame, but using XMLHTTP and a DIV. I...
21
by: karen987 | last post by:
I have a news website, with asp pages. It has publishing software which allows you to add articles in a database, and then calls them up from links etc. I have added dynamic meta tags in 2 parts. The...
1
by: cdmsenthil | last post by:
I have an Infragistics UltrawebGrid . Each Row in the grid is attached to a context menu using Infragistics CSOM Upon click on the menu, I am creating an Iframe dynamically which points to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.