How to remove space before a list

C

Cliff R.

Hi, is there a way to remove the blank space that is added in HTML
when you do a list? For example:

<P>Heading</P>
<UL><LI>Item</LI></UL>

creates a skipped line between the heading and the first list item,
and I'd like the list to start directly on the next line. For example,
like this:

Heading
First item

....instead of this:

Heading

First Item.

Is there a way to achieve this? Thanks for your help.

Cliff
 
D

David Dorward

Cliff said:
Hi, is there a way to remove the blank space that is added in HTML
when you do a list? For example:

<P>Heading</P>

If its a heading, why are you marking it up as a paragraph? Use <h1> (or
whatever number you've reached in your heirachy) and style it to look how
you want)
<UL><LI>Item</LI></UL>

creates a skipped line between the heading and the first list item,
and I'd like the list to start directly on the next line.

That "skipped line" is a margin after the "heading" / before the list. Alter
it with the margin-top and margin-bottom CSS properties.
 
B

brucie

Hi, is there a way to remove the blank space that is added in HTML
when you do a list? For example:

<P>Heading</P>
<UL><LI>Item</LI></UL>

p{margin-bottom:0;}
ul{margin-top:0;}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top