Solved

getting rid of the gap above <ul>

Posted on 2006-12-01
7
387 Views
Last Modified: 2008-03-03
can sum1 help?

i have a title - remember, then on the next line start my <ul>

the ul seems to have a default top margin or something as there is a gap there........

how can i get rid of this?
0
Comment
Question by:scm0sml
[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
  • 2
  • +1
7 Comments
 
LVL 13

Expert Comment

by:rhickmott
ID: 18052306
Odd UL doesent normally have any white space above it what does the source look like?
0
 

Author Comment

by:scm0sml
ID: 18052323
<tr>
<td>
       <b><u><i>Remember</i></u></b><ul>
       
        <li><b><i>Pre Book your Ski / Snowboard Hire, Lift Pass &amp; Lessons</i></b></li>
 and then obviously other <li>'s then close the </td>
0
 
LVL 30

Expert Comment

by:irwinpks
ID: 18052326
You may want to consider using tables and rows.. This allows you to size accordingly with spacers.

The <ul> tag doesn't allow any formatting in size.

if there is a space above, then check for <p><br> or any "whitespace" in your hard code.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Accepted Solution

by:
DreamMaster earned 500 total points
ID: 18052328
Hi scm0sml,

Yes it DOES have white space above it. Like P, Table, Form...UL also generates an extra line break. Notice the difference between:

<ul>
  <li>Item 1</li>
  <li>Item 2</li>
</ul>

and:

<li>Item 1</li>
<li>Item 2</li>

However that's not really a solution, since that doesn't behave the same way a normal unordered list would. You will have to use stylesheets to get the extra spacing away, that is...if you can even get it fully away.

The following style should do the trick..

<style>
UL { margin: 0em; }
</style>

Regards,
Max.
0
 
LVL 13

Expert Comment

by:rhickmott
ID: 18052346
What you need is

<tr>
<td>
           <b><u><i>Remember</i></u></b>

          <ul style="margin-top: 0px">
                <li><b><i>Pre Book your Ski / Snowboard Hire, Lift Pass &amp; Lessons</i></b></li>
             <li>List Item 2</li>
             <li>List Item 3</li>
         </ul>
</td>
0
 

Author Comment

by:scm0sml
ID: 18052348
yes!! very good thatnks dreammaster
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 18052354
Glad to have helped scm0sml :)

Regards,
Max.
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

Title # Comments Views Activity
REST endpoint query with a parameter 1 34
dynamic created check uncheck boxes 6 41
Asp response.write to clients 6 33
output in HTML in Powershell 5 20
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

740 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