473,726 Members | 2,231 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Definition List format adjustments

I'm trying to achieve a format of definition lists that matches the
definition lists generated by IBM's "BookMaster " (from quite a few years
ago).

The effect is as if the terms and their definitions are in a two column
table, all cells vertically aligned. But I'd like to achieve it with a
combination of <DT<DDand CSS so that the result *looks* like this:

<TABLE>
<TR VALIGN=BASELINE ><TD><B>Life<TD >The meaning of life
<TR VALIGN=BASELINE ><TD><B>Liff<TD >The meaning of Liff
</TABLE>

I've missed out all the closing tags to avoid line splitting, but the
above works in every browser (I'd be interested in exceptions, but
that's another topic).

I've done some research, and tried a few samples, but I seem to have
stumbled on the "simplest concept that is all but impossible in CSS".
So far, all I've learned is the CSS for "put this in some weird and
inexplicable place"

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
Aug 8 '07 #1
4 3793
Scripsit Steve Swift:
I'm trying to achieve a format of definition lists that matches the
definition lists generated by IBM's "BookMaster " (from quite a few
years ago).
I have no idea of what that might be. But the rendering issue is a CSS
matter, not HTML, hence off-topic in this group. The HTML perspective is
limited to the choice of markup. This might be affected by styling
possibilities; generally, <tableis easier to style than <dl>. And since
the <dlsemantics is vague at best, as discussed recently in this group,
there is no particular benefit from using it.
The effect is as if the terms and their definitions are in a two
column table, all cells vertically aligned.
So why don't you use a table?
But I'd like to achieve
it with a combination of <DT<DDand CSS
Why?
so that the result *looks*
like this:
<TABLE>
<TR VALIGN=BASELINE ><TD><B>Life<TD >The meaning of life
<TR VALIGN=BASELINE ><TD><B>Liff<TD >The meaning of Liff
</TABLE>

I've missed out all the closing tags to avoid line splitting, but the
above works in every browser (I'd be interested in exceptions, but
that's another topic).
Do you really think that the current behavior of the tag soup slurpers that
you have tested (probably a small fraction of browsers around) is an excuse
for omitting the required </Btags?
I've done some research, and tried a few samples, but I seem to have
stumbled on the "simplest concept that is all but impossible in CSS".
So far, all I've learned is the CSS for "put this in some weird and
inexplicable place"
CSS is discussed in c.i.w.a.stylesh eets. The short answer is that you are
just making life more difficult to yourself by refraining from natural
<tablemarkup and trying to produce tabular look using CSS. In theory, CSS
lets you do that, using declarations like display: table, i.e. turning the
stuff into a table... but this isn't supported by IE.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Aug 8 '07 #2
Thanks, Jim. You've proven H.L Mencken wrong (see
http://www.swiftys.org.uk/wiz?1099) by coming up with an answer which is
clear, simple and *right*!
This might be the moment that I embrace CSS in favour of simple HTML
formatting.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
Aug 8 '07 #3
Scripsit Steve Swift:
Thanks, Jim. You've proven H.L Mencken wrong (see
http://www.swiftys.org.uk/wiz?1099) by coming up with an answer which
is clear, simple and *right*!
Actually, I don't think it would disprove the wisdom even if the solution
were right. The existence of correct solution does non imply non-existence
of wrong solutions.

Besides, Jim's CSS code does not address vertical alignment, which was part
of the problem description. So if it's the answer, then the problem was
different from the description. Vertical alignment works in a particular
manner for tables. Moreover, Jim's code sets an explicit width for the <dt>
elements - something you don't need to do when you use a table. (The code
sets the width to 20%. What happens when the <dtcontents is wider?)

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Aug 8 '07 #4
Besides, Jim's CSS code does not address vertical alignment, which was
part of the problem description.
Whether Jim's solution addresses vertical alignment or not (and as far
as I can see it does, in every browser at my disposal), it is an
absolute dead ringer for the original BookMaster definition list, which
is what I was trying to emulate. It omitted the bold weight for the DT
tag, but even my feeble attempts at CSS were up to that.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
Aug 9 '07 #5

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

Similar topics

9
3751
by: Dave H | last post by:
Hello, I have a query regarding definition lists. Is it good practice semantically to use the dt and dd elements to mark up questions and answers in a frequently asked questions list, or FAQ? Here is an example of just such a usage: <dl class="faq"> <di>
7
4248
by: Neil Zanella | last post by:
Hello, I have posted the following message before but got no replies... I am trying to format an HTML definition list with CSS so that it appears as follows, but am having the following problem: when the definition term (<dt>) on the left is too long, as in the HTML code posted below, the whole definition list gets messed up. I have tested the example with mozilla 1.2.1. Complete code is provided below so you can see what I mean. Anyone...
6
16073
by: Haines Brown | last post by:
I find that when I use list-style-image with galeon or mozilla, padding is inserted between the symbol image and the following list text, while under IE 5.0 it seems to be inserted before the image instead of after it. li.up { list-style-image: url(../bin/arrow.png); height: 1.4em; margin-left: -0.4em; }
7
12965
by: A_StClaire_ | last post by:
hi, I'm working on a project spanning five .cpp files. each file was used to define a class. the first has my Main and an #include for each of the other files. problem is my third file needs to access the class defined in my second file and I can't figure out how to work this right. if I use an #include in my third file, my Main gives me a compile-time class redefinition error. if I don't, the third file can't "see" the second
4
22766
by: intl04 | last post by:
I have a memo field that is included in some Access reports I created. Is there some way for the memo field to display nicely formatted text, with line breaks between paragraphs? Or is it necessary to export the report? I tried exporting a report by using the .rtf rich-text format (the plain-text format was the only other word-processing option listed when exporting). I then opened the .rtf file in Word. However, it looks like some...
4
25520
by: Ced | last post by:
Hi, i'm not an expert in C but i try to compile BTNG software under linux kernel 2.4.2-2. I get these errors at the very first stage. Does someone could have a rapid look on this and tell me what's wrong regards I get this error:
5
9853
by: Roy Smith | last post by:
Be kind to me, I'm a CSS newbie... I've been playing with drupal, building a web site (hyc-test.org). I started with the "sky" theme, but didn't like the way it rendered list items in menus. Spcifically, it started with: list-style-image: url(../../misc/menu-expanded.png);
5
3362
by: sonu | last post by:
hey good morning ...... how to convert a video file in .flv format in php for linux hosting......is there any package whis provide this facility . Can i use ffmpeg for linux hosting project.......... plz help me.. thanks & regards Prabhat
19
2279
by: eotcl | last post by:
Dear All! While looking for the implementation of the printf function, I came across the implementation that used the following construct int printf(const char *format, ...) What is the meaning of "..."? I didn't find it in K&R book, and looking for "..." on the web doesn't seem to be productive. The actual
0
8890
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8752
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
9120
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8101
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
6702
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
4521
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4785
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3228
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
2639
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.