Go Premium for a chance to win a PS4. Enter to Win

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

HTML Lists and spacing

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
kenabbott
Asked:
kenabbott
  • 2
1 Solution
 
Ashish PatelCommented:
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
 
Ashish PatelCommented:
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
 
kenabbottAuthor Commented:
Many thanks - easy when you know how!
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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