- From: Peter Linss <peterl@netscape.com>
- Date: Mon, 14 Jun 1999 14:22:39 -0700
- To: Nicolas Lesbats <nlesbats@etu.utc.fr>
- CC: Håkon Wium Lie <howcome@operasoftware.com>, www-style@w3.org
Nicolas Lesbats wrote:
> On Sat, 12 Jun 1999, Håkon Wium Lie wrote:
>
> | (...) UL { display: table-row }
> | LI { display: table-cell } (...)
>
> Yes, this is fine. But let's take this HTML fragment :
>
> <head>
> <link rel="start" title="Home page" href="">
> <link rel="prec" title="Precedent document" href="">
> <link rel="next title="Next document" href="">
> </head>
>
> My goal is to display this links in a fixed menu on the left 20% of the
> page. Let's see the problems. I can write :
>
> link[start], link[prec], link[next] {
Your selectors are bad, they should be:
link[rel=start], link[rel=prec], link[rel=next]
>
> position: fixed;
> width: 20%; height: 100%;
> left: 0; top: 0; right: auto; bottom: auto;
You should also set the display type unless you really want them to be inline.
You also need to set the display type of the <head> element, because its UA
default value of 'none' will prevent all children from displaying regardless
of their display type.
>
> }
>
> body {
> position: relative;
> width: auto; height: 100%;
> left: 20%; top: 0; right: 0; bottom: auto;
> }
>
> Now I can define :
>
> link[]:before { content: attr(title) }
The "[]" is illegal and should cause this rule to be ignored. Just use
"link:before".
>
>
> or according to a proposal for CSS3
>
> link[] { content: attr(title) }
> /* without a before or after pseudo-element */
>
> First, I can't define that there are links (and the HTML spec doesn't
> define that : I can't imagine the UA behavior). Shouldn't CSS provide here
> a way to render simple links (it's a problem I've just discovered...) ?
>
> Then, I must draw a table (I can do more simply, but admit I need a
> table).
>
> head { display: none }
> link[] { display: table-cell }
>
> is correct according to the spec.
No, it's not correct, the 'display:none' will cause the head and all of its
children to not display.
> But how can I specify the number of
> columns, the table width, etc. since no element in the document source is
> defined as being a table, inline-table or even a table-row ?
Set the <head> to 'display: table-row' if you want each link in a cell in the
same row. Otherwise you can set the <head> to 'display:table' but each link
will be in its own row.
>
>
> Don't we need pseudo-elements like :table, :table-row ... to define that
> (it's a proposal if the answer to the preceding question is "You can't") ?
Yes. Those pseudo elements come in very handy when CSS generates "anonymous"
frames for you. That's why Mozilla already implements them. (For the record,
we have no "anonymous" frames, they *all* have pseudo element names so they
can be styled. This is something that should be formalized in CSS3.)
>
>
> | For an example of a frames-like document, see the example in the CSS2
> | specification [1].
> |
> | [1] http://www.w3.org/TR/REC-CSS2/visuren.html#fixed-positioning
>
> Thanks, it's an interesting example.
>
> --
> Nicolas Lesbats - nlesbats@etu.utc.fr
> 85 r. Carnot 60200 Compiegne - France
> +33/0 686 800 908
>
> Plaider <http://wwwassos.utc.fr/~plaider/>
>
> 3:-) Moooooooooooooooooooooooo !
Received on Monday, 14 June 1999 17:22:43 UTC