Solved

Bulleted list carriage return problem

Posted on 2002-05-29
7
270 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
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!

 

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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

623 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