Solved

list heading too much space

Posted on 2011-03-07
5
376 Views
Last Modified: 2012-05-11
I have a little list and would like it to go right under the heading but there seems to be extra space. How should I code this so right after the title there is only a sinigle line break and the list begins?

<p>title</p>
<ul>  
   <li>item 1</li>
   <li>item 1</li>
</ul>
0
Comment
Question by:Shawn
  • 2
  • 2
5 Comments
 
LVL 16

Expert Comment

by:SSupreme
ID: 35063365
Add this to your markup:
<style type="text/css">
* {      margin: 0px; padding: 0px;}    
</style>
Also add <br /> where you what a break line.
0
 
LVL 1

Author Comment

by:Shawn
ID: 35063410
sorry but that kinda ruins the whole page. In need something to get the title closer to the list.
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 35063606
This is the only way I could get them to squeeze up.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>Untitled</title>
</head>
<body>
<p>title</p>
<ul>  
   <li>item 1</li>
   <li>item 1</li>
</ul>
<p style="margin-bottom: 0;padding-bottom: 0;">title</p>
<ul style="margin-top: 0;padding-top: 0;">  
   <li>item 1</li>
   <li>item 1</li>
</ul>
</body>
</html>

Open in new window

0
 
LVL 1

Author Closing Comment

by:Shawn
ID: 35063634
thank you
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 35067181
You're welcome.  Thanks for the points.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

820 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