Solved

Bulleted list carriage return problem

Posted on 2002-05-29
7
269 Views
Last Modified: 2012-05-04
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
Comment
Question by:vogtster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 7041970
By not using ul

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

Author Comment

by:vogtster
ID: 7041995
If I eliminate <ul>, then how do I get an indentation of the list?
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7042017
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:vogtster
ID: 7042035
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
 
LVL 22

Expert Comment

by:CJ_S
ID: 7042040
AFAIk no, but I may very well be wrong.

CJ
0
 
LVL 2

Accepted Solution

by:
Marianne earned 50 total points
ID: 7042041
<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
 

Author Comment

by:vogtster
ID: 7042058
Thanks, that is what I was looking for and could not figure out from the css documentation.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article discusses four methods for overlaying images in a container on a web page
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question