Jump to content

write way to write a CSS rule fro a named td?


mgason

Recommended Posts

Hi,I am trying to target a td in a page that is created by a cms.I can not just remove it as I don't have acces to those files.I would like to hide or collapse it.How do I write a rule for a td that has a name? eg a named div rule starts #myDivName{ ;}I want to collapse td leftTD.The html is

<body><table cellpadding="0" cellspacing="0" width="100%" id="mainTable">        <tbody><tr valign="top">            <td id="leftTD">                <div id="leftColumnDiv"> 

Another related question when setting visibilty:hidden or display:none on a div, should it hide any content in the div, such as other divs, or images.Right now that does not seem to be the case but the problem could be something else.ThanksMark

Link to comment
Share on other sites

CSS isn't just for divisions, the selectors will work for all elements. Try it!

Link to comment
Share on other sites

The problem with targetting a td to hide or remove, is that you may affect the layout of the table itself, it has lost a cell, so other rows using colspan, may now span the next cell you have hidden/removed. It would e better to target the element within it.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...