|
![](/i/fill.gif) |
Le 12/09/2010 14:21, Orchid XP v8 nous fit lire :
> OK, here's a couple of little questions that somebody here might know
> the answer to...
>
> 1. Suppose I have something like
>
> <h1>Introduction</h2>
you meant </h1>, right ?
> <p class='buttons'><a href="javascript:ShowHide()">(Show/hide)</a></p>
> <div id='intro'>
> ...real content...
>
> Without any CSS, this renders as something like
>
> Introduction
>
>
> (Show/hide)
>
> ...real content...
>
> Is there some way I can style it so that it shows up more like
>
> Introduction
> (Show/hide)
>
>
> ...real content...
>
> or even
>
> Introduction (Show/hide)
>
>
> ...real content...
>
> If so, how do I do it?
without css ? in plain html 1.0 ? No chance without breaking some bits.
<p> will always force a line-feed/spacing
<h..> is alone on its line.
<h1>Introduction <a href="...">(Show/hide)</a></h1>
is the best you can have. (with a <br/> before starting the <a> if you
want, but I do not like it.)
Now, if you want to show/hide the <div>, why do you need to do that
outside the div itself ? And why javascript ?
if it is not done with css, rather show it always and do not display the
hide/display mechanism.
BTW:
<h1>Introduction</h1> (that's bad, as only 1 h1 per page, so, unless the
page's object is introduction (to what ?).. you got a content's issue.
<h1>Subject of page</h1>
<h2>Introduction</h2>
is probably better.
>
>
>
> 2. I want to build a file tree where you can collapse or expand tree
> nodes. The obvious way to do this is with the <ul> element. However, I
> also want each file to have attributes, a creation date, and so forth,
> and all these columns should line up vertically. The obvious way to do
> that is with a table. But it can't be a table and a list at the same time!
>
> I could use nested tables I suppose, but nested tables are EVIL! Is
> there some more semantically-transparent way that I can do this?
>
> Root 2009-09-12 Ahsc
> Resources 2009-09-10 Ahsc
> Main.css 2009-09-10 Ahsc
> Main.js 2009-09-10 Ahsc
> Packages 2009-09-12 Ahsc
> ansi-terminal 2009-09-12 Ahsc
> ...
>
You need to tag your date & attribute (with span), and have the css to
position them at absolute horizontal position (in em or ex! or you will
get issue with fontsize/resize by user)
That way, you nest your <ul><li>, and each line (<li>) got its semantic.
<ul>
<li>Root<span class="datum">2009-09-12</span><span
class="attributes">Ahsc</span><ul>
<li>Resources<span class="datum">2009-09-12</span><span
class="attributes">Ahsc</span><ul>
<li>Main.css<span class="datum">2009-09-12</span><span
class="attributes">Ahsc</span></li>
<li>Main.js<span class="datum">2009-09-12</span><span
class="attributes">Ahsc</span></li>
</ul></li>
<li>Packages<span class="datum">2009-09-12</span><span
class="attributes">Ahsc</span><ul>
<li>ansi-terminal<span class="datum">2009-09-12</span><span
class="attributes">Ahsc</span></li>
...
</ul></li>
</ul></li></ul>
Post a reply to this message
|
![](/i/fill.gif) |