473,786 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Blank line after a definition list (DL)?

Is there a way I can have the browser automatically insert a blank
line after each definition in a definition list? Right now I have
this:

term-1
definition text ....
term -2
definition text ...

I'd like to have this:

term-1
definition text ....

term -2
definition text ...
But I want to do it without manually putting a blank line after each
"definition text".
Mar 2 '08 #1
6 4497
..oO(Timur Tabi)
>Is there a way I can have the browser automatically insert a blank
line after each definition in a definition list?
Sure. Use CSS to adjust the bottom margin of the 'dd' elements:

dd {margin-bottom: 1em}

Micha
Mar 2 '08 #2
On 2008-03-02, Timur Tabi <ti***@tabi.org wrote:
Is there a way I can have the browser automatically insert a blank
line after each definition in a definition list? Right now I have
this:

term-1
definition text ....
term -2
definition text ...

I'd like to have this:

term-1
definition text ....

term -2
definition text ...
But I want to do it without manually putting a blank line after each
"definition text".
dl { margin-bottom: 2.24em }
Mar 2 '08 #3
On 2008-03-02, Michael Fesser <ne*****@gmx.de wrote:
.oO(Timur Tabi)
>>Is there a way I can have the browser automatically insert a blank
line after each definition in a definition list?

Sure. Use CSS to adjust the bottom margin of the 'dd' elements:

dd {margin-bottom: 1em}
Oops, yes that's what I meant when I just said to put a margin-bottom on
the dl.

You could use margin-bottom: 1.12em since that's normally what's used in
browser default stylesheets to approximate the height of one line. It
doesn't make much difference though.
Mar 2 '08 #4
On 3/2/2008 12:44 PM, Timur Tabi wrote:
Is there a way I can have the browser automatically insert a blank
line after each definition in a definition list? Right now I have
this:

term-1
definition text ....
term -2
definition text ...

I'd like to have this:

term-1
definition text ....

term -2
definition text ...
But I want to do it without manually putting a blank line after each
"definition text".
I prefer to specify margins at the top, not only for Web pages but also
when using Word.

<style TYPE="text/css">
dt { margin-top: 1em }
dd { margin-top: 0.5em }
</style>

This puts a one-em blank line before the defined term (the dt) and only
a half-em line between the defined term and the definition itself (dd).

--
David Ross
<http://www.rossde.com/>

Have you been using Netscape and now feel abandoned by AOL?
Then use SeaMonkey. Go to <http://www.seamonkey-project.org/>.
Mar 2 '08 #5
Scripsit Ben C:
You could use margin-bottom: 1.12em since that's normally what's used
in browser default stylesheets to approximate the height of one line.
It doesn't make much difference though.
And you don't need to make guesses on the line height, because you can
set it (it's healthy anyway; the specific value should depend on the
font characteristics ):

* { line-height: 1.12; }
dd { margin-bottom: 1.12em; }

A full blank line might be a little too much, though.

Anyway, this is purely a CSS matter. It would not make sense to try to
force empty vertical spacing using HTML markup, especially since it's so
simple in CSS.

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

Mar 2 '08 #6
"Jukka K. Korpela" <jk******@cs.tu t.fiwrites:
And you don't need to make guesses on the line height, because you can
set it (it's healthy anyway; the specific value should depend on the
font characteristics ):
The specific value should depend on several factors, language not the
least of them (erm, I know that you know that, but you don’t say that
above, and normal people never consider that ;-).
A full blank line might be a little too much, though.
I wonder why the idea of a baseline grid is so alien to web
typography. But I don't even know if I disagree. :-)

--
“Rapidiously develop corporate value rather than installed base process
improvements. Collaboratively unleash process-centric synergy with
interoperable best practices.”
<http://www.apple.com/downloads/dashboard/developer/corporateipsum. html>
Mar 3 '08 #7

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

Similar topics

1
645
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...
28
9289
by: Atanas Boev | last post by:
I have a heading that I would like to link to site section, in the following context: <h1>Site Contents</h1> <h2>First Section</h2> <h2>Second Section</h2> <h2>Third Section</h2> I want that the section headings are poining to the relevant sections of the site. Since I am not specialist, excuse me if it is a stupid question, but
9
3752
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>
22
27254
by: Firas | last post by:
Hi, Is there a CSSish way to indent a paragraph except for the first line? I tried p:first-line { text-indent: 0em; }
2
3249
by: Todd | last post by:
I am somewhat new to ASP.NET and I am probably overlooking some basic rule that's causing my error. Anyways, here's the scoop: I am using a DataReader to access a SQL stored procedure. I want the result set from the DataReader to be dumped into a DataList and displayed on the page. I already know that my data, the stored procedure, and the database connectivity all work correctly because I have outputted all this data to a dataGrid...
13
6845
by: onetitfemme | last post by:
I think browsers do it pretty much by default. How can you avoid that? It just doesn't look right/pretty for short definitions and also how can you not indent the whole <dd> so that in stead of looking like this: <code> _ _ _ term: def def def def def def ... _ _ _ _ _ _ def def def def def def ... </code>
10
2021
by: matt_randle | last post by:
Hi, I have a problem styling a definition list. If you look at http://68.178.211.60/MattRandle/Guides/Plants/MarginalsNZ.htm you will see the effect I am trying to achieve. If, however, the flower image is smaller than the description text that appears to its
11
2392
by: David | last post by:
Hi Everyone, I'm trying to grab all of the elements of a DL, specifically the <a href>'s grouping them by the DD's. I suppose if I can just get them into groups I can get the href's later. The hard part is getting them grouped as explained below. For example... <dl id="dlList">
6
7591
by: James A. Donald | last post by:
In firefox, the following standards based css gives me a numbered definition list: dl {counter-reset: item1; } dt:before { counter-increment: item1; content: counter(item1) ". "; }
0
9655
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9497
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
10363
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...
1
10110
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
9964
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
8993
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 projectplanning, coding, testing, and deploymentwithout 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
7517
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
6749
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();...
3
2894
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.