list heading too much space

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

   <li>item 1</li>
   <li>item 1</li>
Question by:Shawn
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 16

Expert Comment

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

Author Comment

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

Accepted Solution

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"

   <li>item 1</li>
   <li>item 1</li>
<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>

Open in new window


Author Closing Comment

ID: 35063634
thank you
LVL 83

Expert Comment

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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Title # Comments Views Activity
Table style position to the left 8 39
Scroll 5 news at a time using vticker 2 41
Sticking text to shapes in Raphael.js 6 41
Can't Find The Code 15 22
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
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 Browse or search based on font properties or name to find a suitable font for…

752 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