Web Hosting CSS & Stylesheet Forums

Add Me

User Name
Password
Go Back   CSS & Stylesheet Forums > CSS Forumz: Main > Style Sheet In General

Welcome to the CSS & Stylesheet Forums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Tags:



Reply
  #1 (permalink)  
Old 09-01-2008, 05:11 AM
Daniel Jung
Guest
 
Posts: n/a
Diggs:
Default 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
Reply With Quote


Sponsored Links
  #2 (permalink)  
Old 09-01-2008, 05:11 AM
Ben C
Guest
 
Posts: n/a
Diggs:
Default Re: making dd and dt adjacent

On 2008-08-31, Daniel Jung <jung@uib.no> wrote:
> 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 <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 (permalink)  
Old 09-01-2008, 05:11 AM
Ben C
Guest
 
Posts: n/a
Diggs:
Default Re: making dd and dt adjacent

On 2008-08-31, Ben C <spamspam@spam.eggs> wrote:
[...]
> 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 (permalink)  
Old 09-01-2008, 05:11 AM
Daniel Jung
Guest
 
Posts: n/a
Diggs:
Default Re: making dd and dt adjacent

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
Reply With Quote


  #5 (permalink)  
Old 09-02-2008, 01:14 AM
Ben C
Guest
 
Posts: n/a
Diggs:
Default Re: making dd and dt adjacent

On 2008-08-31, Daniel Jung <jung@uib.no> wrote:
> 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.
Reply With Quote


  #6 (permalink)  
Old 09-02-2008, 01:14 AM
Daniel Jung
Guest
 
Posts: n/a
Diggs:
Default Re: making dd and dt adjacent

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




Reply With Quote


  #7 (permalink)  
Old 09-02-2008, 01:14 AM
Johannes Koch
Guest
 
Posts: n/a
Diggs:
Default Re: making dd and dt adjacent

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.)
Reply With Quote


  #8 (permalink)  
Old 09-02-2008, 01:14 AM
Daniel Jung
Guest
 
Posts: n/a
Diggs:
Default Re: making dd and dt adjacent

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</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 (permalink)  
Old 09-02-2008, 01:14 AM
Johannes Koch
Guest
 
Posts: n/a
Diggs:
Default Re: making dd and dt adjacent

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.)
Reply With Quote


  #10 (permalink)  
Old 09-02-2008, 01:14 AM
Ben C
Guest
 
Posts: n/a
Diggs:
Default Re: making dd and dt adjacent

On 2008-09-01, Daniel Jung <jung@uib.no> wrote:
> 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 Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 09:14 PM.
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.




Inactive Reminders By Mished.co.uk