473,771 Members | 2,406 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with descriptive lists in CSS

I am trying to use descriptive lists, <DL>, as shown in
<http://www.maths.man.a c.uk/~jhaig/tmp/test.html> with a style sheet
at <http://www.maths.man.a c.uk/~jhaig/tmp/default-2.css>. With
Mozilla and Opera they appear correctly, with a border round both the
<DT> and <DD> parts but in Internet Explorer the borders are messed
up. Can anyone please tell me where the mistake is?

As an aside, the <div id="main"> section should have the right border
20px from the right hand side of the window. How can I get this to
display properly?

Thanks.
Jul 20 '05 #1
29 3062
jh***@maths.man .ac.uk (Joseph Haig) wrote:
I am trying to use descriptive lists, <DL>,
The "D" in "DL" stands for "definition ", not description. If you say
<dl><dt>foo</dt><dd>bar</dd></dl>,
then you are saying, by HTML specs, that the meaning of the term "foo" is
defined by the expression "bar". That is, to decide whether something is
a "foo", one should consult the expression "bar".
With
Mozilla and Opera they appear correctly, with a border round both the
<DT> and <DD> parts but in Internet Explorer the borders are messed
up. Can anyone please tell me where the mistake is?


What you are asking about is a CSS issue, not an HTML matter. From the
HTML standpoint, the relevant answer is that you should use DL for
definition lists - though the HTML specifications themselves obscure this
simple state of affairs. Generally, DL elements are particularly tricky
in CSS perspective, so it is not fruitful to use DL just to achieve a
particular layout, violating the semantic considerations, and then try to
prevent browsers from using that layout.

For example, using a table would probably be more fruitful if it is just
a collection of "things" and associated "notes".

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #2
Thank you for the reply.

Jukka K. Korpela wrote:
jh***@maths.man .ac.uk (Joseph Haig) wrote:
I am trying to use descriptive lists, <DL>,
The "D" in "DL" stands for "definition ", not description. If you say
<dl><dt>foo</dt><dd>bar</dd></dl>,
then you are saying, by HTML specs, that the meaning of the term "foo" is
defined by the expression "bar". That is, to decide whether something is
a "foo", one should consult the expression "bar".


Specifically, I am using this for data taken from a database. <dt> contains
the field name and <dd> contains the information in that field. Not
strictly 'definitions' but I still think it is suitable. I will, however,
take your advise and see if I can do it some other way.
With
Mozilla and Opera they appear correctly, with a border round both the
<DT> and <DD> parts but in Internet Explorer the borders are messed
up. Can anyone please tell me where the mistake is?


What you are asking about is a CSS issue, not an HTML matter.


Could you please suggest a CSS newsgroup? I have not been able to find one
and this group seemed to be the most suitable for my question.

Jul 20 '05 #3
Joseph Haig wrote:
Specifically, I am using this for data taken from a database. <dt> contains
the field name and <dd> contains the information in that field.
That fits the structure of a definition list just fine, no need to
try and find a different method.
Could you please suggest a CSS newsgroup?


Try comp.infosystem s.www.authoring.stylesheets

--
Lachlan Hunt
http://www.lachy.id.au/
la**********@la chy.id.au.updat e.virus.scanners

Remove .update.virus.s canners to email me,
NO SPAM and NO VIRUSES!!!
Jul 20 '05 #4
Lachlan Hunt <la**********@l achy.id.au.upda te.virus.scanne rs> wrote:
Joseph Haig wrote:
Specifically, I am using this for data taken from a database. <dt>
contains the field name and <dd> contains the information in that
field.


That fits the structure of a definition list just fine,


Not at all. The _meaning_ of a field name is quite different from the
different values in the field in different data sets. For example, if the
name is "year", then the definition might be 'the year in which the book
was published', if the database is bibliographic. The value of the field
could be "1952" or "2004" or something else; none of the values _defines_
what the field name _means_ - rather, any useful interpretation of the
data requires some external information about that meaning.

A collection of field name, field value pairs is - both theoretically and
pragmatically - best described as a table, perhaps so that the field name
is a <th> element and the field value is a <td> element, though one might
conceivably use <td> for both of them as well.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #5
Jukka K. Korpela wrote:
Lachlan Hunt <la**********@l achy.id.au.upda te.virus.scanne rs> wrote:
Joseph Haig wrote:
Specifically , I am using this for data taken from a database. <dt>
contains the field name and <dd> contains the information in that
field.
That fits the structure of a definition list just fine,


Not at all. ... For example, if the
name is "year", then the definition might be 'the year in which the book
was published', if the database is bibliographic.


Yes, that's one interpretation of a definition list.
The value of the field
could be "1952" or "2004" or something else; none of the values _defines_
what the field name _means_


True, but a definition list isn't strictly for defining the meaning
of a term like in a glossary or dictionary. In that example, the
definition list can be interpreted as defining the value for the property.

Lets take a look at the example taken from the HTML 4.01 spec:
# Another application of DL, for example, is for marking up
# dialogues, with each DT naming a speaker, and each DD
# containing his or her words.

So, a sample definition list could be used to markup content like this:
<dl>
<dt>Fred</dt>
<dd><q>Hello Barney</q></dd>
<dt>Barney</dt>
<dd><q>Hi Fred</q></dd>
</dl>

So, technically, that doesn't fit your strict definition for a
defintion list either, since "Fred" doesn't mean "Hello Barney", it is
just the what Fred said; but it does fit what the specification says.

--
Lachlan Hunt
http://www.lachy.id.au/
la**********@la chy.id.au.updat e.virus.scanners

Remove .update.virus.s canners to email me,
NO SPAM and NO VIRUSES!!!
Jul 20 '05 #6

"Lachlan Hunt" <la**********@l achy.id.au.upda te.virus.scanne rs> wrote in
message news:Hf******** ***********@new s-server.bigpond. net.au...
Jukka K. Korpela wrote:
Lachlan Hunt <la**********@l achy.id.au.upda te.virus.scanne rs> wrote:
Joseph Haig wrote:
Specifically , I am using this for data taken from a database. <dt>
contains the field name and <dd> contains the information in that
field.

That fits the structure of a definition list just fine,
Not at all. ... For example, if the
name is "year", then the definition might be 'the year in which the book
was published', if the database is bibliographic.


Yes, that's one interpretation of a definition list.
The value of the field
could be "1952" or "2004" or something else; none of the values _defines_ what the field name _means_


True, but a definition list isn't strictly for defining the meaning
of a term like in a glossary or dictionary. In that example, the
definition list can be interpreted as defining the value for the property.


I agree with this.

Lets take a look at the example taken from the HTML 4.01 spec:
# Another application of DL, for example, is for marking up
# dialogues, with each DT naming a speaker, and each DD
# containing his or her words.


I have some hesitation about this. It would be fine if a list consists of a
set of distinct characters, each matched with a set of his well-known
catch-phrases:

Fonzie
Aaaaaaayyyyyyyy .
Arnold from Different Strokes
Whatchu talkin' 'bout, Willis?
Flip Wilson's Geraldine
The devil made me do it!
What you see is what you get! (Yes, this is where WYSIWYG comes
from.)
Whoooooo!!!
Chester Riley
What a revoltin' development this is!

But a script departs from this pattern in a couple of ways. First, it isn't
an association of *distinct* terms with their corresponding values, in the
way that a real definition list is. The same character appears on multiple
entries in the list. Second, it's limited to special cases, because the
general case of a script or dialog is not a uniform list of characters their
lines. In the general case, stage directions are interspersed, breaking up
the monolithic nature of the list. You could have a series DLs separated by
the stage directions, but that would be semantically dishonest, because the
set of lines that happens to be between two successive stage directions
might not be a single cohesive unit. I'm not sure what a *better* markup
would be in that case, but DL would be rather artificial for this purpose.

Jul 20 '05 #7
Lachlan Hunt <la**********@l achy.id.au.upda te.virus.scanne rs> wrote:
True, but a definition list isn't strictly for defining the
meaning of a term like in a glossary or dictionary.
Really?
In that example, the
definition list can be interpreted as defining the value for the
property.
But that's completely different; a <dl> element contains <dt> and <dd>
elements, and <dt> stands for definition term, and each <dd> supplies a
definition for some of the term. It's not about defining values of fields
but about defining meanings of terms.
Lets take a look at the example taken from the HTML 4.01 spec:
# Another application of DL, for example, is for marking up
# dialogues,
Which is just nonsense. A dialogue is not a definition list in _any_
sense. We have two options:
- We think that the W3C has no meaningful definition for what <dl>
means. Hence we should not use it all. (It does not really serve
in a useful way as a presentational trick, since CSS can do
such jobs much better.)
- We take the normative part, the definition, seriously - more seriously
than the specification itself - and ignore examples that do not fit
into that meaning.
<dt>Fred</dt>


Remember that <dt> comes from "definition term". Is "Fred" really a term
being defined?

If <dl> is not a list of definitions for terms, then what _is_ it?
Anything that someone wants to use to achieve a particular layout?
(Rather poorly, since the default rendering is not very good and the odds
of styling it are worse than the odds of styling e.g. a table.)
It's nonsensical to define an element in one particular way and then
start telling how it "can be used" for completely different meanings as
well.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #8
"Jukka K. Korpela" <jk******@cs.tu t.fi> wrote in message news:<Xn******* *************** *******@193.229 .0.31>...
- We think that the W3C has no meaningful definition for what <dl>
means. Hence we should not use it all.
This is a rather "dog in the manger" attitude. I could support it more
easily if HTML had semantics worth talking about. We all know the
"HTML = content, CSS = presentation" argument, but the sad fact is
that HTML just doesn't have the inherent detail to support this
(without bolting <span class="..." id="..." > everywhere)

Who cares what the default semantics of <dl> are ? They're no clearer
or less clear than <h2> or <address> (<address> is surely the most
confused, yet useful)
(It does not really serve
in a useful way as a presentational trick, since CSS can do
such jobs much better.)


I use <dl> a lot, and I use it whenever I need a list structure where
there's a substantial "two part" nature to each list element. I do the
rest with CSS, and if I wanted a numbered list I might even do that
with CSS. Marking-up dialogue (as the W3C suggest) works well with
<dl> and has a reasonable fall-back in the "lost CSS" case. Doing it
with <li> would involve rather too many <span>s and changing display
properties for my taste.
Jul 20 '05 #9
Andy Dingley wrote:
Who cares what the default semantics of <dl> are ? They're no clearer
or less clear than <h2> or <address> (<address> is surely the most
confused, yet useful)
I'd say <h2> is pretty clear: a second level heading, a sub-heading.
<address> is oddly named, but the semantics seem clear enough. "Who's
responsible for this page?"
I use <dl> a lot, and I use it whenever I need a list structure where
there's a substantial "two part" nature to each list element.
As do I. <dl> is most valuable for me as a way to structure groups,
where each group does not have the same number of items, e.g.,

menu item, price, description, (optional) additional combo price

A table could be used, with empty fields, but that's not the best in
terms of a data structure.
Marking-up dialogue (as the W3C suggest) works well with
<dl> and has a reasonable fall-back in the "lost CSS" case. Doing it
with <li> would involve rather too many <span>s and changing display
properties for my taste.


I agree, though using <dl> for these purposed -- or for mine -- is
dubious. In the end, I've unilatererally changed <dl> from defintion
list to general 2+ array list. Frankly, I don't know why the
recommendations have general use stuff like <p> and <table> on the one
hand, and rediculously specific-use markup like <dl>, <var>, and
<samp> on the other.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #10

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

Similar topics

0
1286
by: Joseph Haig | last post by:
Below is a question I posted on comp.infosystems.www.authoring.html and I was advised to try here instead. > I am trying to use descriptive lists, <DL>, as shown in > <http://www.maths.man.ac.uk/~jhaig/tmp/test.html> with a style sheet > at <http://www.maths.man.ac.uk/~jhaig/tmp/default-2.css>. With > Mozilla and Opera they appear correctly, with a border round both the > <DT> and <DD> parts but in Internet Explorer the borders are...
5
6695
by: cwm137 | last post by:
I am trying to call the click event of a button located in a subform called "Order Subform" from a button in the parent. However, since the subform was made with the wizard, it contains a space in its name, so the syntax that I have found for this has not been working. If anyone knows the syntax for this, I would appreciate it.
16
46741
by: Frank Chow | last post by:
Please see the following code: /* main.c */ #include <stdio.h> int main() { double d; scanf("%f", &d);
1
1462
by: Manish Jain | last post by:
Platform : Asp.Net/C#, Framework 1.1 -------------------------------------------- I have many overloads of constructors/other methods in most of my classes. I want to provide some descriptive help when people cosume such classes, just like MS does say when I say : new DataSet( and I get a list of constructors, along with a description of constructor, and paramter in the second line.
5
1643
by: Merlin | last post by:
Hello All, Hope somebody wouldn`t mind helping me, i have a problem and as a newbie I don`t know where im going wrong: I keep getting the following error "An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll" on the line that says: "daPatientsIDs.Fill(dtPatientsIDs)" When trying to run this Code:
6
2086
by: visionstate | last post by:
Hi there, I am building a database that requires cascading lists on a form. I currently have (I may be adding more later) 3 combo boxes on my form - Department, Surname and Forename. The user chooses the department they want and then the corresponding surnames from that department can be chosen from the Surname box and then the Forename depending on which Surname they chose. I then have a command button which produces the results of the...
15
2097
by: lucky | last post by:
Hi Guys You are probably my last chance to avoid getting crazy To help you understand my problem I have put images online showing the issue I have: http://www.australix.net/images/pb I have an XML file containing links and I use an XSL file to build a
12
2060
by: Lars Eighner | last post by:
I take this example from a writer in alt.usage.english <news://r3jie3p93s1eaflgcckn2hinf3li4mnfud@4ax.com>, where the question of whether the "and" is required came up strictly as an issue of English usage, because it illustrates a recurring problem in HTML markup. How should this be marked up? Yes, generally, "Bob went to the store..." is marked up in P and the items as LI in OL. But logically, the list belongs to the paragraph. ...
2
2316
by: Man4ish | last post by:
I have created Graph object without vertex and edge property.It is working fine. #include <boost/config.hpp> #include <iostream> #include <vector> #include <string> #include <boost/graph/adjacency_list.hpp> #include <boost/tuple/tuple.hpp> #include <set> using namespace std;
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10103
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8934
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.