PDA

View Full Version : padding/spacing in lists


ShMiL
08-13-2002, 11:26 AM
I have a list (<ul>) and I want to do two things:
1. to expand the spacing between the text and the disc (the little dot saying it is a new element in the list).
2. to expand the spacing between every element in the list.


anyone knows?
PLZ HELP.
Thanks,
ShMiL

Morgoth
08-13-2002, 12:26 PM
http://www.idocs.com/tags/_OL_START.html

Try this.
If you can't find a way to make the space between any bigger, then it might not be able to be done.

Unless you use .&.n.b.s.p.;.

REMOVE THE "." FOR IT TO WORK. (It doesn't show up as normal text on this message board.)

<OL>
<LI>.&.n.b.s.p.;.Place geletin mold over plate
<LI>Tap gently with a spoon
<LI>Lift mold off of geletin
</OL>

REMOVE THE "." FROM THE CODE FOR THIS TO WORK. (It doesn't show up as normal text on this message board.)



As for makeing the text between text:
Adding it in a table, or using <BR> seem to only work.

<OL>
<LI>Place geletin mold over plate
<br>
<LI>Tap gently with a spoon
<br>
<br>
<LI>Lift mold off of geletin
</OL>


as you can see ONE <BR> doesn't do it... you need TWO <BR><BR>


Happy?

ShMiL
08-13-2002, 01:30 PM
( :

I'm looking for the CSS way to do it...
I'm sure there is, I just don't know how...

Morgoth
08-13-2002, 02:09 PM
Well, this way works too.
Maybe you should just take it.

ShMiL
08-13-2002, 02:44 PM
I'm sure it works but I want to force it on all <ul> tags.
I NEED CSS!

Morgoth
08-13-2002, 02:53 PM
Have you tried to google it?

ShMiL
08-13-2002, 03:05 PM
No Luck

Roy Sinclair
08-13-2002, 04:06 PM
The CSS for part of what you want is here (http://www.w3.org/TR/CSS2/generate.html#markers) . Finding a browser that honors the CSS is another matter entirely.

You can increase space between items using padding and margins in CSS (http://www.w3.org/TR/CSS2/box.html#mpb-examples) .

ShMiL
08-13-2002, 04:47 PM
The second link really helped me!
But I have another problem:
I have a <li> tag that contains a long text (more than two rows). Now the dot is vertical aligned to the top - and I want it to be v-aligned to the middle. How can I do that using CSS?
Thanks,
ShMiL

Morgoth
08-13-2002, 05:07 PM
It's never enough with you, eh ShMiL?

hehe

Roy Sinclair
08-13-2002, 06:47 PM
Originally posted by ShMiL
The second link really helped me!
But I have another problem:
I have a <li> tag that contains a long text (more than two rows). Now the dot is vertical aligned to the top - and I want it to be v-aligned to the middle. How can I do that using CSS?
Thanks,
ShMiL

This paragraph from the CSS2 specifications pretty much rules out what you're wanting:

The height of a marker box is given by the 'line-height' property. The :before (:after) marker box participates in the height calculation of the principal box's first (last) line box. Thus, markers are aligned with the first and last line of an element's content, even though the marker boxes live in distinct line boxes. If no first or last line box exists in a principal box, the marker box establishes its line box alone.

ShMiL
08-13-2002, 07:16 PM
i'm afraid I don't quite understand what you quoted...
Can you translate it into simple words?

Roy Sinclair
08-13-2002, 07:22 PM
Originally posted by ShMiL
i'm afraid I don't quite understand what you quoted...
Can you translate it into simple words?

What is says is that the "marker" will be aligned with the first line of a multi-line list item. That's what's expected and no provision was made in CSS to alter that behavior.

ShMiL
08-13-2002, 09:05 PM
Not possible. So I'll use spaces instead.
Thanks alot to you all.
ShMiL

ShMiL
08-13-2002, 09:08 PM
I meant I won't use the valign option (cuz it's not possible).
But I still can't change the padding between the DOT and the TEXT...
Have you done this before? Do you know how to do it?
Thanks,
ShMiL

Vladdy
08-13-2002, 09:23 PM
Originally posted by ShMiL
I have a <li> tag that contains a long text (more than two rows). Now the dot is vertical aligned to the top - and I want it to be v-aligned to the middle.

Brings to mind my favourite quote..... (I know I'm supposed to be helpful here but sorry, can not help it....)

"Good enough is good enough, while perfect is always a pain in the *** and often not worth the effort anyway"
- Tom Clancy

Vladdy
08-13-2002, 09:26 PM
Now if you really want it that bad...

<table>
<tr>
<td valign="center">
<img src="dot.gif">
</td>
<td> put your "li" stuff here
</td>
</tr>
.....
</table>

ShMiL
08-13-2002, 09:47 PM
thanks alot, but I want it to be CSSed and not TABLEd.
I know all the ways besides CSS - what I'm looking 4 is the CSS way...