473,388 Members | 1,207 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Problem styling definition list


Hi,

I have a problem styling a definition list.

If you look at

http://68.178.211.60/MattRandle/Guid...arginalsNZ.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
right, I cannot get the next definition term to clear the image.
Scroll down the page to 'Saururus' and 'Scripus' and you will see what
I mean.

Snippet of HTML is,

<dl>
<dt>Pontedeia</dt>
<dt class="image"><img src="Guides/Plants/pontederia.jpg"></dt>
<dd>Text goes here</dd>
</dl>

The CSS is,

..pics dt {
margin: 0 0 10 0;
}

..pics dt.image {
width :200;
text-align: right;
float: left;
}

..pics dd {
padding : 0;
margin: -5 0 0 220;
}

A cannot clear:left on the .pics dt because the navigation column on
the main page is floated left.

Any advice appreciated.

Thanks in advance,

Matt

Mar 2 '06 #1
10 1982
ma*********@yahoo.com wrote:

I have a problem styling a definition list.
If you look at
http://68.178.211.60/MattRandle/Guid...arginalsNZ.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
right, I cannot get the next definition term to clear the image.
Scroll down the page to 'Saururus' and 'Scripus' and you will see what
I mean.

Mozilla/SM v1.0.0.
Well, no, I don't see what you mean. It all looks the same. I see the
resulting layout but how is that different from what you envision?
What does "clear the image" mean?
What browser(s) have you tried?

Correct your validation errors.
Use HTML 4.01 Strict DTD, not transitional. (And the DTD you do specify
is incomplete.)

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Mar 2 '06 #2
Mozilla/SM v1.0.0.
Well, no, I don't see what you mean. It all looks the same. I see the
resulting layout but how is that different from what you envision?
What does "clear the image" mean?
What browser(s) have you tried?

Correct your validation errors.
Use HTML 4.01 Strict DTD, not transitional. (And the DTD you do specify
is incomplete.)

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)


I have tried it in IE6 and Firefox. Same effect.

By "Clear the image" I mean that the heading for the next flower should
start on the next row, and not to the right of the previous image.
Maybe you have large text size set so you are not getting the same
effect ? As I said in my original post, the problem only happens when
the text to the right of the image is smaller than the image.

Matt

Mar 3 '06 #3

Just to be clear, the text for 'Saururus' is smaller than the
associated image so that 'Scripus' doesn't start on the next line
(because the image is floated left).

Mar 3 '06 #4

Thanks for the DOCTYPE advice. I am new to web design. I found a good
article on A List Apart that explains the issues.

Mar 3 '06 #5
ma*********@yahoo.com wrote:
What does "clear the image" mean?


By "Clear the image" I mean that the heading for the next flower should
start on the next row, and not to the right of the previous image.
Maybe you have large text size set so you are not getting the same
effect ? As I said in my original post, the problem only happens when
the text to the right of the image is smaller than the image.

Yes, I have a minimum font size set so I can force too-small fonts to a
size I can read.
Use a <div> to wrap the <dl>. Then you can add clear:both to the <dt>.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Mar 4 '06 #6
Jim Moe wrote:
Use a <div> to wrap the <dl>. Then you can add clear:both to the <dt>.

Bzzt! Wrong! That does not work.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Mar 4 '06 #7

Jim Moe wrote:
Jim Moe wrote:
Use a <div> to wrap the <dl>. Then you can add clear:both to the <dt>.

Bzzt! Wrong! That does not work.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)


The problem doesn't appear in Opera only in IE
THere is a list of IE bugs around
I'll look for it

Bernard

Mar 4 '06 #8
http://www.positioniseverything.net/

Herre is the list good luck

B

Mar 4 '06 #9
matt_randle wrote:
<dl>
<dt>Pontedeia</dt>
<dt class="image"><img src="Guides/Plants/pontederia.jpg"></dt>
<dd>Text goes here</dd>
</dl>


This doesn't answer your question, but I would have thought that the image
would be better in a DD rather than a DT, as it appears to be part of the
definition.

What is a Pontedia? It's this: [image].

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Mar 4 '06 #10

I found the solution in this article

http://www.positioniseverything.net/easyclearing.html

in the section 'A Word of Warning'.

The parent container (in this case a <dl>) needs to be floated right.

Thanks for your replies.

Matt

Mar 6 '06 #11

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

Similar topics

29
by: Joseph Haig | last post by:
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...
5
by: Peter Collinson | last post by:
Hi... Is there any way to style a List Item a different color and size than the <LI> in an Ordered List? I'd like a red super-script number and a dark blue text in a page's footnotes. And...
11
by: skeeterbug | last post by:
not sure what i'm doing developing on xmas... but i guess we all have our own demons! -lol- i'm using the following css to style my horizontal menu... /* STYLE HORIZONTAL MENU */ #hmenu...
0
by: Lucas, Todd | last post by:
Hello everyone! I'm having a problem with a WebControl that I'm designing for a Menu. I've been at it for about 3 weeks now, and can't seem to get around this problem. So I'm hoping that someone...
6
by: ashkaan57 | last post by:
Hi, How can I set up the styling for different levels of <ULto use different images for bullets, be indenetd differently, ... Like: .. list 1 - item 1 - item 2 .. list 2
1
by: TomT | last post by:
I am having a difficult time solving a problem. Whenever I use :hover in a certain <div> the page shrinks in IE6. Of course, this problem does not exist with other browsers. It is even more vexing...
12
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...
10
by: strife | last post by:
Hey everyone, I was making a program for a class, and I ran into a problem that is driving me crazy. I first suspected Vista, and since I am not home I cannot verify if it just my Vista...
10
by: amitabh.mehra | last post by:
Hi I havent used MQT before. Read the online tips and tutorials but none seems to give any hint for my problem. I have a base table (base_table) as: st varchar(25) default...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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,...
0
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...
0
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...

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.