Solved

HTML Lists and spacing

Posted on 2007-11-14
3
144 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

747 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now