Solved

list heading too much space

Posted on 2011-03-07
5
373 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

920 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

15 Experts available now in Live!

Get 1:1 Help Now