naifyboy123
asked on
space between list items
this should be easy but is quite urgent
when you create a list (ul, ol etc, etc) how do you put a space netween the lines - i have tried using <br> but then my code fails html validation
for example
<ul>
<li>line one</li>
<li>line two</li>
<li>line three</li>
</ul>
how do i force a space between the lines whilst keeping my code vaild? - i need a solution that will work in IE, Netscape and Firefox.
thanks
when you create a list (ul, ol etc, etc) how do you put a space netween the lines - i have tried using <br> but then my code fails html validation
for example
<ul>
<li>line one</li>
<li>line two</li>
<li>line three</li>
</ul>
how do i force a space between the lines whilst keeping my code vaild? - i need a solution that will work in IE, Netscape and Firefox.
thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
yes, by using margin-bottom
example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<head>
<title>Test</title>
<style type="text/css">
li{
margin-bottom:10px;
}
</style>
</head>
<body>
<ul>
<li>this line is long and actually spans 2 lines on the page before the next list item is shown and therefore the second line of the list shows a space which i dont want</li>
<li>this line is normal and only spane one line of the page</li>
<li>this line is alo slong blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah</li>
<li>and this line only spans one line as well</li></ul>
</body>
</html>
example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<head>
<title>Test</title>
<style type="text/css">
li{
margin-bottom:10px;
}
</style>
</head>
<body>
<ul>
<li>this line is long and actually spans 2 lines on the page before the next list item is shown and therefore the second line of the list shows a space which i dont want</li>
<li>this line is normal and only spane one line of the page</li>
<li>this line is alo slong blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah</li>
<li>and this line only spans one line as well</li></ul>
</body>
</html>
ASKER
sorry shoud have refreshed before posting - thank batalf
Glad I could help!
Batalf
Batalf
ASKER
<ul>
<li>this line is long and actually spans 2 lines on the page before the next list item is shown and therefore the second line of the list shows a space which i dont want</li>
<li>this line is normal and only spane one line of the page</li>
<li>this line is alo slong blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah</li>
<li>and this line only spans one line as well</li></ul>
sorry - is there a way i can only make the list "items" have the space between them rather than a space on every line regardless?