Solved

list heading too much space

Posted on 2011-03-07
5
379 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
[X]
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
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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

617 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