473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

making dd and dt adjacent

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
Aug 31 '08 #1
14 2877
On 2008-08-31, Daniel Jung <ju**@uib.nowrote:
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.
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.
I'd rather not user :after or :before because of browser compatibility.
I can't think of an alternative besides just putting a <brin 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.
Aug 31 '08 #2
On 2008-08-31, Ben C <sp******@spam.eggswrote:
[...]
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".
Aug 31 '08 #3
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". 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.
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
Aug 31 '08 #4
On 2008-08-31, Daniel Jung <ju**@uib.nowrote:
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.
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.
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>.
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.
Sep 1 '08 #5
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)?

- Daniel


Sep 1 '08 #6
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>
<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.)
Sep 1 '08 #7
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". In the sense of "term", you are right.

But anyway, I agree that the <dl>pair</dl><dl>pair</dlis 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
Sep 1 '08 #8
Daniel Jung schrieb:
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.)
Sep 1 '08 #9
On 2008-09-01, Daniel Jung <ju**@uib.nowrote:
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.
Sep 1 '08 #10
On 2008-09-01, Daniel Jung <ju**@uib.nowrote:
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". In the sense of "term", you are right.

But anyway, I agree that the <dl>pair</dl><dl>pair</dlis 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)?
What sort of parsers? Are you thinking of search engines or people
trying to script your site?
Sep 1 '08 #11
On Mon, 1 Sep 2008, Daniel Jung wrote:
But thinking of it: what would the benefit of a _single_ enclosing dl be
(as opposed to one for each pair)?
I don't know.
I only know that I could not find a solution for the sample page
http://freenet-homepage.de/prilop/vocabulary.html
with a single enclosing DL that would "work" in the same way
for both Firefox and Internet Explorer.
Sep 1 '08 #12
Johannes Koch wrote:
>
<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.
Thanks

- daniel
Sep 1 '08 #13
On 31 Aug, 22:51, Daniel Jung <j...@uib.nowrote:
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..
Maybe this combination could do it:

dt { float: left; clear: left }
dd { display: block; margin-bottom: 1em }
Sep 2 '08 #14
Roy A. wrote:
Maybe this combination could do it:

dt { float: left; clear: left }
dd { display: block; margin-bottom: 1em }
Thanks a lot!

- Daniel
Sep 3 '08 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: Bernard Fields | last post by:
Greets, all. As the title suggests, I'm trying to make a maze. Specifically, it's a top-down, 2-d maze, preferably randomly generated, though I'm willing to forego that particular aspect as...
4
by: Stan Brown | last post by:
Brian Wilson's Index Dot CSS at <http://www.blooberry.com/indexdot/css/supportkey/syntax.htm> says that no version of MSIE supports adjacent sibling selectors, such as p+p. Is that actually...
3
by: NullBock | last post by:
Hey, so I'm trying to put two iframes on a page adjacent to each other. here's my code : <html> <head><style type="text/css"> body { margin: 0; }
3
by: Rennie deGraaf | last post by:
Is it possible to force adjacent block elements to have the same height, without specifying that height? In this page (http://pages.cpsc.ucalgary.ca/~degraaf/test/index3.html), I have a bunch of...
1
by: Jimbo Jones | last post by:
G'day, I have a table of records representing a 3D block model of an orebody, such that each block has X, Y, Z and then properties (grades), such as Ni, RecNi, Cu etc, as well as 2 volume fields,...
3
by: sdisalvo | last post by:
I'm looking for a way to filter records in a query (or report) based on a value in a field of an adjacent record. Can this be done easily? I cannot find any info in the help files. Thanks
2
by: OceanBreeze | last post by:
Border drawn in C# Table programmatically even if several adjacent horizontal & vertical cells are empty in the table I want to programmatically have border on each and every row and column in the...
5
by: Andy B | last post by:
I have 2 TextBoxes and an Add button on a page. When the user fills in the TextBoxes, the values are added to a dataset table. When the page gets done reloading, the TextBoxes are turned into...
5
by: Nathan Sokalski | last post by:
I'm not sure if this is the right place to ask this question, but I wasn't sure where else to go. I have a table made of the following tags: <table class="myclass"> <tbody> <tr><td>.</td></tr>...
3
by: cowboyrocks2009 | last post by:
Hi, I am trying to write a Java program to plot rectangles with different colors side by side non overlapping but unfortunately I am unable to do that as of now. Suppose I want to create 3...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.