...

View Full Version : Spacing in <ul> list



EnnisP
07-01-2011, 10:30 AM
How do I add space between the first and second line in one item on a <ul> list. Following is an example of my problem:


Doesnít allow feelings to control their actions.
They do what they should do even when they donít feel like it, at least most of the time.


Both the above lines are part of the same item on a list but I need space between these two lines.

How do I achieve that?

My CSS code for ordered and unnumbered lists is:


#contentleft ol {margin: 0px 0px 0px 20px; padding: 0px 0px 10px 0px;}
#contentleft ol li {margin: 0px 0px 0px 20px; padding: 0px 0px 5px 0px;}
#contentleft ul {
list-style-type: square;
margin: 0px 0px 0px 20px;
padding: 0px 0px 10px 0px;
}
#contentleft ul li {
list-style-type: square;
margin: 0px 0px 0px 20px;
padding: 0px 0px 5px 0px;
}

You can see the problem illustrated here (http://nowthinkaboutit.com/2011/07/roots-of-responsibility-by-john-rosemond/).

teedoff
07-01-2011, 04:43 PM
Not sure which section of your page you're talking about. Can you elaborate please?

If you're talking about the #content p{}, then you could just add top padding to that css declaration of say 10px.

Ok nevermind, I reread your question and saw your example here and on your page. Yes try this:


#content p {
line-height: 20px;
margin: 0;
padding: 10px 0;

kwdamp
07-01-2011, 05:36 PM
I think you're wanting to work with line height. Something like this is probably your best bet: http://www.w3schools.com/cssref/tryit.asp?filename=trycss_line-height

I think you could add it in either the ul or li tag, but you'll have to double check that. I've never tried it.

kwdamp
07-01-2011, 05:38 PM
Sorry, just saw the line-height variable in there. Not sure if you edited that after or if I just missed it.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum