The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

hey Phil - maybe it's me, but I think your question is a little hard to understand - you say you have the display you want, but you'd like to control this table with css rather than using the padding and spacing attributes for TABLE - can you explain why?

as this page indicates, using css padding for TABLE is problematic in all the major browsers - have you tried border-spacing?

Originally posted by mmi hey Phil - maybe it's me, but I think your question is a little hard to understand - you say you have the display you want, but you'd like to control this table with css rather than using the padding and spacing attributes for TABLE - can you explain why?

as this page indicates, using css padding for TABLE is problematic in all the major browsers - have you tried border-spacing?

Thanks for your response...

Correct - I have the correct display, but I need it done in all CSS instead of the HTML cellpadding and cellspacing and partial CSS.

Originally posted by mmi since you say you've struggled with this some already, I'm thinking if you can tell us why this is the case, that may open the door to finding a solution

Okay, it doesn't HAVE to be done in CSS (obviously, since I have the display already). But I really wanted it to (so all the table properties are stored in CSS and all I have to do to make the table look right is add the class.

I came here b/c I thought since this is the CSS forum you guys would know how to do it.

Your HTML code uses the cellpadding and spacing attributes for the TABLE tag. You use that code and say it's exactly what you want but you say that you want it to be CSS. Have you tried the padding attribute?

Also, I'm not sure why you're so focused on getting your HTML and CSS to talk to each other when as MMI mentioned there are known issues with what you're trying to do.

To be perfectly honest, trying to seperate your content from your presentation is admirable, but done properly there would only be one or two places that you would need to change cellspacing and cellpadding in your TABLEs.

I will point out one thing in your original and following posts. No one hear is under any obligation to help you out, or to test their code before they post it. Neither are the people here working for the W3c that we would be the end all fount of knowledge regarding CSS. Please bear that in mind before you get a little snippy with our members.

I know that people don't have to answer here... and that people don't know everything. I am a frequent poster in the ASP forums, both asking and helping others. I only asked people to test the code first because I had seen a lot of pages about this through searching google, but none worked.

I wasn't trying to discourage you. I also agree that people should test their code. What's the point if you don't right? If you;re taking the time to answer then at least try to make your answer "the" answer.

Basically I see one of your main problems is likely to be that you using the Micro$oft browser typically: table, tr, td {border-spacing 0px;} would produce an almost exact replica in a browser like Mozilla 1.0.

However, you have to ask yourself why are you using <table> for a vertical menu bar and require its styling via CSS... It seems like a misuse of the <table> element; when well written CSS without the <table> element could have produced better results in a fully CSS-2 compliant browser.

Originally posted by xhtmlcoder Basically I see one of your main problems is likely to be that you using the Micro$oft browser typically: table, tr, td {border-spacing 0px;} would produce an almost exact replica in a browser like Mozilla 1.0.

However, you have to ask yourself why are you using <table> for a vertical menu bar and require its styling via CSS... It seems like a misuse of the <table> element; when well written CSS without the <table> element could have produced better results in a fully CSS-2 compliant browser.

That's fair enough, I was just trying to get across it is possible to have something similar using CSS without any tables; that is assuming the browser interprets the CSS correctly...

I don't know if your browser is up to the task but if you look here at one of my friend's sites: http://www.rickbull.co.uk/ you'll see a CSS menu without the use of any <table> elements, yes the menu is different but you should be able to now understand what I meant.

The result should be the "Menu Heading" text will turn white and the background 'cell row' colour will turn silver. Without a doubt the syntax I've just there is very ragged and poorly written but it should achieve the required results.