Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 276
  • Last Modified:

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?
0
vogtster
Asked:
vogtster
  • 3
  • 3
1 Solution
 
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
 
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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
 
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
 
vogtsterAuthor Commented:
Thanks, that is what I was looking for and could not figure out from the css documentation.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now