Solved

list heading too much space

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

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 82

Expert Comment

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

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
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.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

758 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

20 Experts available now in Live!

Get 1:1 Help Now