Reply to Re: display:none ignored

Your name:

Reply:


Posted by Beauregard T. Shagnasty on 11/01/06 12:45

Willem Alberda wrote:

> Hi

Good morning.

> If I create a small html file with the following lines
>
> <table>
> <span style='display:block'><tr><td>Number one</td></tr></span>
> <span style='display:none'><tr><td>Number two</td></tr></span>
> <span style='display:block'><tr><td>Number three</td></tr></span>
> </table>

<table>
<tr><td><span style='display:block'>Number one</span></td></tr>
<tr><td><span style='display:none'>Number two</span></td></tr>
<tr><td><span style='display:block'>Number three</span></td></tr>
</table>

> all three lines are displayed while I expected that "Number two" would be
> hidden.

...and there will still be a space for the table row.

> If I remove the <table> and </table> tags, it indeed only shows the
> first and the third line, so somehow the table interferes here, but I
> don't know why or how.

<span> is an inline element, and cannot contain a block level element.
The validator would have told you this.

Now ... would a *list* be more appropriate for the above, instead of a
table?

--
-bts
-Motorcycles defy gravity; cars just suck

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация