Bulleted list carriage return problem

The following code produces an unwanted carriage return (an extra blank line) between the "This is..." line and the first item in the list. How can this be solved?

This is a list:
<ul>
<li>Item #1
<li>Item #2
</ul>

Like this:

This is a list:

     Item #1
     Item #2

This is what I want:

This is a list:
     Item #1
     Item #2

Is there a "style" to control this?
vogtsterAsked:
Who is Participating?
 
MarianneCommented:
<ul style="margin-top: 0px;">
<li>Item #1
<li>Item #2
</ul>

Does nothing in NN4.x, but is not harmful and can be used to achieve good results in "good" browsers and acceptable results in "old" ones.
0
 
CJ_SCommented:
By not using ul

This is a list:
<li>Item #1
<li>Item #2
0
 
vogtsterAuthor Commented:
If I eliminate <ul>, then how do I get an indentation of the list?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
CJ_SCommented:
for ex.

This is a list:
<table border=0 cellspacing=0 cellpadding=0>
<tr><td width=20>&nbsp;</td><td>
<li>Item #1</li>
<li>Item #2</li>
</td></tr></table>
0
 
vogtsterAuthor Commented:
Yes, I know how to use tables to do formatting, but isn't there a css attribute to control the style of lists and/or indentation?
0
 
CJ_SCommented:
AFAIk no, but I may very well be wrong.

CJ
0
 
vogtsterAuthor Commented:
Thanks, that is what I was looking for and could not figure out from the css documentation.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.