Solved

HTML Lists and spacing

Posted on 2007-11-14
3
163 Views
Last Modified: 2011-09-20
Hi

I am using the following html for a list

<p>List:
         <ul>
           <li>One</li>
             <li>Two</li>
           <li>Three</li>
          <li>Four</li>
         </ul>
</p>

However when I run the page there is always a line space between the word List and the first item of the list.  However I want there to be no space but can't seem to achieve this.

Thus instead of...

List:

-One
-Two
-Three

..I want...

List:
-One
-Two
-Three


Changing/moving the <p> tag makes no difference and tried playing around with CSS settings.

I'm sure there is a simple solution

Cheers

Ken
0
Comment
Question by:kenabbott
  • 2
3 Comments
 
LVL 23

Accepted Solution

by:
Ashish Patel earned 500 total points
ID: 20279571
bit indented but may be of your use, do this.
         <ul>List:
           <li>One</li>
             <li>Two</li>
           <li>Three</li>
          <li>Four</li>
         </ul>
0
 
LVL 23

Expert Comment

by:Ashish Patel
ID: 20279610
Or this will help you.
<p>List:
         <ul style="MARGIN-TOP: 0px">
           <li>One</li>
             <li>Two</li>
           <li>Three</li>
          <li>Four</li>
         </ul>
</p>
0
 

Author Comment

by:kenabbott
ID: 20279639
Many thanks - easy when you know how!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
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 …

821 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