HighDots Forums  

making dd and dt adjacent

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss making dd and dt adjacent in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Daniel Jung
 
Posts: n/a

Default making dd and dt adjacent - 08-31-2008 , 04:51 PM






Hi



I have a glossary for Latin words. URL:
http://www.vroma.org/help/glossary.html

The list marked up as paragraphs for each entry, and that looked very
well. We changed it to definition list though, since that is what we
believe is the best semantical markup. Now, want the dd to be right next
to the dt, since the dd contains grammatical properties of the dt which
normally are written right next to the lemma (word entry). Example:

(SHOULD BE)
acta -orum: n. pl. a written record of events

(IS)
acta
-orum: n. pl. a written record of events

Aside: We felt that the "-orum" should not be part of the dt since it is
a grammatical property to the entry, not the entry itself.

Having one dl only surrounding the pairs has proven difficult. Right
now, each dt/dd pair is enclosed in a dl container. This is the only way
we could achieve the rendering as we want it (see above, or refer to the
URL). I have tried every way I could think of, using floats and clears
and inlines and margins, but apparantly, I must have missed a combination.

I'd rather not user :after or :before because of browser compatibility.

I am grateful for any input.
Thanks
- Daniel

Reply With Quote
  #2  
Old   
Ben C
 
Posts: n/a

Default Re: making dd and dt adjacent - 08-31-2008 , 06:07 PM






On 2008-08-31, Daniel Jung <jung (AT) uib (DOT) no> wrote:
Quote:
Hi



I have a glossary for Latin words. URL:
http://www.vroma.org/help/glossary.html

The list marked up as paragraphs for each entry, and that looked very
well. We changed it to definition list though, since that is what we
believe is the best semantical markup. Now, want the dd to be right next
to the dt, since the dd contains grammatical properties of the dt which
normally are written right next to the lemma (word entry). Example:

(SHOULD BE)
acta -orum: n. pl. a written record of events

(IS)
acta
-orum: n. pl. a written record of events

Aside: We felt that the "-orum" should not be part of the dt since it is
a grammatical property to the entry, not the entry itself.
Not that you were asking for quibbles, but I think the -orum belongs in
the dt since it identifies the word.

"educo, educere" is a different _word_ from "educo, educare". We're not
dealing with two alternative definitions of the same word.

The infinitive (and other parts) are listed so that you can recognize
the word in all its forms-- that information is part of the word, not
part of the definition.

Quote:
Having one dl only surrounding the pairs has proven difficult. Right
now, each dt/dd pair is enclosed in a dl container. This is the only way
we could achieve the rendering as we want it (see above, or refer to the
URL). I have tried every way I could think of, using floats and clears
and inlines and margins, but apparantly, I must have missed a combination.
Yes I see the problem. You've made dt and dl inline so they're next to
each other, but you want each dt to start a new line.

dd:after
{
content: "\A";
white-space: pre;
}

would do nicely, but you don't want to use :after.

display: run-in on <dt> (with display: block on <dd>) would also be a
good way to do it, but that's less widely supported than :after.

Quote:
I'd rather not user :after or :before because of browser compatibility.
I can't think of an alternative besides just putting a <br> in the
markup at the end of each definition.

Or just not using <dl>s at all. What's wrong with:

<div class="definition">
<span class="word">acta</span>
<span class="genitive">actionis</span>
<span class="general">blah blah etc.</span>
...
</div>

Maybe it's "divitis" but very friendly for anyone who wants to process
your document. If anyone complains just blather about semantic
meta-micro-languages until they shut up.

:after does work in the latest generation of browsers. For one thing
it's needed for the nose in http://acid2.acidtests.org/, and everyone's
been working hard to get that test working recently.


Reply With Quote
  #3  
Old   
Ben C
 
Posts: n/a

Default Re: making dd and dt adjacent - 08-31-2008 , 06:08 PM



On 2008-08-31, Ben C <spamspam (AT) spam (DOT) eggs> wrote:
[...]
Quote:
Yes I see the problem. You've made dt and dl inline so they're next to
each other, but you want each dt to start a new line.
I meant "you've made dt and dd inline".


Reply With Quote
  #4  
Old   
Daniel Jung
 
Posts: n/a

Default Re: making dd and dt adjacent - 08-31-2008 , 06:46 PM



Ben C wrote:

Quote:
Not that you were asking for quibbles, but I think the -orum belongs in
the dt since it identifies the word.

"educo, educere" is a different _word_ from "educo, educare". We're not
dealing with two alternative definitions of the same word.

I see. Thanks. But that creates another problem: searching for "acta"
won't return that definition; the search would then have to be "acta
-orum" or "acta, -orum". I want users to find BOTH words "educo" when
they search for "educo". The might not know that there are two. Besides
the fact that they indeed are rooted in the same meaning: 'raise, bring
forward'.

But I see your point.

Quote:
What's wrong with:
span class="word">acta</span
span class="genitive">actionis</span
The grammar. (SCNR) Syntactically, nothing wrong. Semantically - well,
it _is_ a definition list, and the only (best) semantical markup for
that are dls. Classes are not semantics... Another thing: would google's
define find that that way?

Thanks for your informative, and quick, answer!

- Daniel


Reply With Quote
  #5  
Old   
Ben C
 
Posts: n/a

Default Re: making dd and dt adjacent - 09-01-2008 , 03:26 AM



On 2008-08-31, Daniel Jung <jung (AT) uib (DOT) no> wrote:
Quote:
Ben C wrote:

Not that you were asking for quibbles, but I think the -orum belongs in
the dt since it identifies the word.

"educo, educere" is a different _word_ from "educo, educare". We're not
dealing with two alternative definitions of the same word.


I see. Thanks. But that creates another problem: searching for "acta"
won't return that definition; the search would then have to be "acta
-orum" or "acta, -orum". I want users to find BOTH words "educo" when
they search for "educo".
Yes, you do want that, but there's no reason why the keywords for your
search facility have to be the same as what you put in the <dt>s on the
page? But perhaps you're thinking of Google.

Quote:
The might not know that there are two. Besides the fact that they
indeed are rooted in the same meaning: 'raise, bring forward'.
Are they?

educere is just a compound of duco which means to lead, so it means to
lead out or bring forward. educare I thought was related to "edo, esse"
meaning "to eat", and therefore basically means to "feed" and thereby to
bring up (a child etc.).

So one means to lead things out, the other to cram things in. The word
"education" comes from the latter.

Quote:
But I see your point.

What's wrong with:
span class="word">acta</span
span class="genitive">actionis</span

The grammar. (SCNR) Syntactically, nothing wrong. Semantically - well,
it _is_ a definition list, and the only (best) semantical markup for
that are dls.
It was a nice idea to use a dl, and CSS does provide at least two ways
of styling it the way you want (:after and display: run-in), of which
:after is fairly well supported.

But if you need to support browsers that don't support :after you have
choose your compromise. No real harm in inline dt/dd and putting a <br>
after every <dd>.

Quote:
Classes are not semantics... Another thing: would google's
define find that that way?
Good question, I don't know how Google's define works.


Reply With Quote
  #6  
Old   
Daniel Jung
 
Posts: n/a

Default Re: making dd and dt adjacent - 09-01-2008 , 06:40 AM



Ben C wrote:

Quote:
It was a nice idea to use a dl, and CSS does provide at least two ways
of styling it the way you want (:after and display: run-in), of which
:after is fairly well supported.

But if you need to support browsers that don't support :after you have
choose your compromise. No real harm in inline dt/dd and putting a <br
after every <dd>.
Thanks again, Ben. Your input is valuable to me.

But thinking of it: what would the benefit of a _single_ enclosing dl be
(as opposed to one for each pair)?

- Daniel






Reply With Quote
  #7  
Old   
Johannes Koch
 
Posts: n/a

Default Re: making dd and dt adjacent - 09-01-2008 , 07:41 AM



Daniel Jung schrieb:
Quote:
But thinking of it: what would the benefit of a _single_ enclosing dl be
(as opposed to one for each pair)?
A dl ist a definition _list_. What you created is a sequence of one-item
definition lists. It's similar to

<ul>
<li></li>
</ul>
<ul>
<li></li>
</ul>
<ul>
<li></li>
</ul>

or

<table>
<tr><td></td><td></td></tr>
</table>
<table>
<tr><td></td><td></td></tr>
</table>
<table>
<tr><td></td><td></td></tr>
</table>

--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)


Reply With Quote
  #8  
Old   
Daniel Jung
 
Posts: n/a

Default Re: making dd and dt adjacent - 09-01-2008 , 08:10 AM



Johannes Koch wrote:
Quote:
Daniel Jung schrieb:
But thinking of it: what would the benefit of a _single_ enclosing dl
be (as opposed to one for each pair)?

A dl ist a definition _list_. What you created is a sequence of one-item
definition lists. It's similar to

ul
li></li
/ul
ul
li></li
/ul
Not quite, since there _is_ a "list" (a pair). The term and the
definition are _listed_, which your examples are not. It depends on how
you define "item". In the sense of "term", you are right.

But anyway, I agree that the <dl>pair</dl><dl>pair</dl> is ugly, and
breaks with an educated reader's intuition and expectations. The
question is just how acceptable the ugliness is.

And besides the ugliness: What is the _benefit_ of it (for parsers)?

- Daniel


Reply With Quote
  #9  
Old   
Johannes Koch
 
Posts: n/a

Default Re: making dd and dt adjacent - 09-01-2008 , 08:24 AM



Daniel Jung schrieb:
Quote:
Johannes Koch wrote:
Daniel Jung schrieb:
But thinking of it: what would the benefit of a _single_ enclosing dl
be (as opposed to one for each pair)?

A dl ist a definition _list_. What you created is a sequence of
one-item definition lists. It's similar to

ul
li></li
/ul
ul
li></li
/ul

Not quite, since there _is_ a "list" (a pair). The term and the
definition are _listed_, which your examples are not. It depends on how
you define "item".
<http://www.w3.org/TR/html4/struct/lists.html#edef-DL>:
Definition lists vary only slightly from other types of lists in that
list items consist of two parts: a term and a description.

--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)


Reply With Quote
  #10  
Old   
Ben C
 
Posts: n/a

Default Re: making dd and dt adjacent - 09-01-2008 , 11:09 AM



On 2008-09-01, Daniel Jung <jung (AT) uib (DOT) no> wrote:
Quote:
Ben C wrote:

It was a nice idea to use a dl, and CSS does provide at least two ways
of styling it the way you want (:after and display: run-in), of which
:after is fairly well supported.

But if you need to support browsers that don't support :after you have
choose your compromise. No real harm in inline dt/dd and putting a <br
after every <dd>.

Thanks again, Ben. Your input is valuable to me.

But thinking of it: what would the benefit of a _single_ enclosing dl be
(as opposed to one for each pair)?
It's just more natural to think of the page as one big word list.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.