473,810 Members | 3,142 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 3799
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
3757
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
4255
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
16076
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
12969
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
22780
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
25569
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
9858
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
3369
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
2286
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
9603
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
10644
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10379
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...
0
10124
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
6882
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();...
0
5550
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...
1
4334
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
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
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.