472,954 Members | 1,565 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,954 software developers and data experts.

newline probs within <dt>

Hi..

I'm trying to achieve a newline effect within a <dt> block, but am having
problems.

Here is the basic code:

<dl>
<dt>
<a href="admin_menu.html" class="small">Click here to modify the
'Home' menu section</a>
<a href="index.html">Home</a>
</dt>
<dd><a href="index.html">Me!</a></dd>
<dd><a href="index.html">Oz &amp; N.Z.</a></dd>
<dd><a href="index.html">Stuff</a></dd>
</dl>
And here are the two ways I've tried to place a newline between the <a>'s in
the <dt>:

<a href="admin_menu.html" class="small">Click here to modify the 'Home'
menu section</a><br>
<a href="index.html">Home</a>
and:

<p><a href="admin_menu.html" class="small">Click here to modify the
'Home' menu section</a></p>
<a href="index.html">Home</a>
My problem is that <p> is not valid inside a <dt>, but the <br> places a
vertical break at the bottom of the <dt> in the UA which looks decidedly
out-of-place. I'm using styles to make everything look nice. Is there a way
to add a newline between the <a>'s which won't add a vertical break?

You can see it in action at:
http://www.plankmeister.org.uk/new/a...e_section.html

If you mouseover the the "click here to..." above Home you'll see it looks
wrong, compared to the one above Photography. The top one however, validates
while the one below doesn't.
P.
Jul 20 '05 #1
6 3848
"The Plankmeister" <pl******************@hotmail.com> wrote:
I'm trying to achieve a newline effect within a <dt> block, but am
having problems.
The simplest and safest solution is to stop using <dl>. First, you
haven't got a _definition list_, have you? Second, <dl> elements are
displayed in a primitive manner, and it's more difficult to fix that in
CSS than to start from something simpler and style it. More info:
http://www.cs.tut.fi/~jkorpela/def.html#impl
<dt>
<a href="admin_menu.html" class="small">Click here to
modify the
'Home' menu section</a>
<a href="index.html">Home</a>
You are not presenting a _definition_ for the _term_ "Click here to
modify the 'Home' menu section Home", are you? Au contraire, you
_postulate_ (often incorrectly) that the user knows your definition for
the word "Home" in this context.
And here are the two ways I've tried to place a newline between the
<a>'s in the <dt>:
The first method, <br>, is technically correct for the purpose stated.
It does not, however, help e.g. a blind person who is listening to your
page, since line breaks are usually insignificant then.
My problem is that <p> is not valid inside a <dt>,
Yes, that makes the second method rather suspicious. And isn't it
pretty obvious that a _definition term_ must not contain a paragraph?
but the <br>
places a vertical break at the bottom of the <dt> in the UA which
looks decidedly out-of-place. I'm using styles to make everything
look nice.
Well, <br> creates a line break, which is what you said what you
wanted. The rest seems to be about styles, hence off-topic here.
Is there a way to add a newline between the <a>'s which
won't add a vertical break?


Are you asking how to break a line without breaking a line, or are you
asking for help with your CSS?

In either case, I would say you are asking a wrong question. You are
probably fighting, in part, with some problems that you created by
using <dl>, for no good reason.

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

Jul 20 '05 #2

"The Plankmeister" <pl******************@hotmail.com> wrote in message
news:3f***********************@dread11.news.tele.d k...
Hi..

I'm trying to achieve a newline effect within a <dt> block, but am having
problems.

Here is the basic code:

<dl>
<dt>
<a href="admin_menu.html" class="small">Click here to modify the
'Home' menu section</a>
<a href="index.html">Home</a>
</dt>
<dd><a href="index.html">Me!</a></dd>
<dd><a href="index.html">Oz &amp; N.Z.</a></dd>
<dd><a href="index.html">Stuff</a></dd>
</dl>


Wow. Those sure are some weird definitions.
--
Karl Core

In heaven all the interesting people are missing.
Friedrich Nietzsche

eightninethree AT eightninethree.com
Jul 20 '05 #3
"The Plankmeister" <pl******************@hotmail.com> wrote:
I'm trying to achieve a newline effect within a <dt> block, but am having
problems.

Here is the basic code:

<dl>
<dt>
<a href="admin_menu.html" class="small">Click here to modify the
'Home' menu section</a>
<a href="index.html">Home</a>
</dt>
<dd><a href="index.html">Me!</a></dd>
<dd><a href="index.html">Oz &amp; N.Z.</a></dd>
<dd><a href="index.html">Stuff</a></dd>
</dl>
So "Me!", "Oz & N.Z" and "Stuff" are definitions of the term "Click
here to modify the Menu menu section Home" ?

Interesting.
And here are the two ways I've tried to place a newline between the <a>'s in
the <dt>:
But you've already set a {display: block} in your CSS, so there is
already a line break between the two links anyway.

Or put the two links in two different <dt>s. Why not use two <dt>s
instead of one? (Assuming that you decide to continue not caring about
telling lies by claiming that these are definition terms.) Just tweak
the CSS accordingly.
My problem is that <p> is not valid inside a <dt>, but the <br> places a
vertical break at the bottom of the <dt> in the UA which looks decidedly
out-of-place. I'm using styles to make everything look nice. Is there a way
to add a newline between the <a>'s which won't add a vertical break?


Yes, take out the <br> and just let the CSS do it's work.

Or stop abusing the <dl>, <dt> and <dd> elements and use something
more appropriate like nested <ul>s instead.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #4
Wow. Those sure are some weird definitions.


I get the impression that abusing tags 'round these parts is heresy. Points
taken. I guess I should rework the menu into <ul>'s then.
Or is even using nested <ul>'s bad? What is the best way of constructing a
menu?
Jul 20 '05 #5

"The Plankmeister" <pl******************@hotmail.com> wrote in message
news:3f***********************@dread11.news.tele.d k...
Wow. Those sure are some weird definitions.
I get the impression that abusing tags 'round these parts is heresy.

Points taken. I guess I should rework the menu into <ul>'s then.
Or is even using nested <ul>'s bad? What is the best way of constructing a
menu?


Think of it in context of what it is: A list of links. If there's no
specific order to them, then use <ul>
Nested <ul> is fine, if nesting is indeed needed.

For instance, a list of V8 engines:

<ul>
<li>Dodge
<ul>
<li>318</li>
<li>340</li>
<li>360</li>
</ul>
</li>
<li>Chevy
<ul>
<li>262</li>
<li>283</li>
<li>302</li>
</ul>
</li>
<li>Ford
<ul>
<li>289</li>
<li>302</li>
<li>351</li>
</ul>
</li>
</ul>
--
Karl Core

In heaven all the interesting people are missing.
Friedrich Nietzsche

eightninethree AT eightninethree.com
Jul 20 '05 #6
"The Plankmeister" <pl******************@hotmail.com> wrote in message news:<3f***********************@dread11.news.tele. dk>...
I'm trying to achieve a newline effect within a <dt> block, but am having
problems.
[snip]
My problem is that <p> is not valid inside a <dt>


No, your problem is that you are using definition list markup for
something that is not a list of definitions. Try instead a combination
of <p>s and an unordered list, wrapped in a <div> with an appropriate
class - then add the CSS to get read of the list markers and perform
other desired formating within that <div>.

--- Stephen Morley ---
http://www.safalra.com
Jul 20 '05 #7

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

Similar topics

2
by: AES/newspost | last post by:
In a markup like <dd> <br> some other stuff <br> </dd> the first break seems to add a blank line before the other stuff, but the second doesn't add a blank line after the other stuff. The...
25
by: Shannon Jacobs | last post by:
Maybe there is a simple trick here, and I'm not spotting it... Is there a guru of CSS hanging around here who can help out? The page in question has a multi-column table with a list of links in...
0
by: Dan Trowbridge | last post by:
He everyone, I just getting started with .NET and I am having a porting problem. I get and error in code that lookes like this (really stripped down but you get the idea)... class dt {...
7
by: Dan Trowbridge | last post by:
He everyone, I am just getting started with .NET and I am having a porting problem. I get and error in code that lookssomething like this (really stripped down but you get the idea)... class...
2
by: Jasonkimberson | last post by:
I am doing a data pull of HTML from a database that will be put into a drop down menu currently after i pull and populate the information, it converts my < into &lt; whats the work around for...
13
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...
9
by: David Trimboli | last post by:
In designing some of my pages (see http://www.trimboli.name/rune/goblinmagic.html for an example), I created a lot of markup to mimic the book upon which the pages are based. My thinking at the...
5
nathj
by: nathj | last post by:
Hi All, I'm working on a new site that has a two column layout underneath a title bar. If you check out: http://www.christianleadership.org.uk/scratch/mainpage.php using IE or Opera you will...
8
by: michael | last post by:
Hi all A client of mine is having a problem with their site and when I looked into the SQL database, I found that most text fields have been altered and appended with script...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
1
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.