unwanted space in html ul li

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
jarow
Forum Commoner
Posts: 83
Joined: Tue Jan 28, 2003 2:58 am

unwanted space in html ul li

Post by jarow »

I am getting an unwanted space on my html document between Macellolophus rubromarginatus and
Fam. Paradoxosomatidae (syn. Strongylosomatidae, Strongylosomidae). Can anyone tell me how to get rid of it.

Thanks


<p><strong><font color="#000099">Ord.
Polydesmida</font></strong></p>
<ul><li> Fam. Chelodesmidae</li>
<li>Fam. Xystodesmidae (syn. Devilleidae)
<ul>
<li>Gen.<em> Macellolophus</em>
<ul>
<li><em>Macellolophus rubromarginatus</em> Lucas 1846</li>
</ul>
</li>
</ul>
</li>
<li>Fam. Paradoxosomatidae (syn. Strongylosomatidae, Strongylosomidae)
<ul>
<li>Gen. <em>Boreviulisoma </em></li>
</ul>
</li>
User avatar
igoy
Forum Contributor
Posts: 203
Joined: Fri May 02, 2003 11:57 pm
Location: India
Contact:

Post by igoy »

Little more specific please... I tried using the code you posted.. but couldn't understand what space you are talking about...
User avatar
igoy
Forum Contributor
Posts: 203
Joined: Fri May 02, 2003 11:57 pm
Location: India
Contact:

Post by igoy »

Maybe try this...

Code: Select all

<p align="left"><strong><font color="#000099">Ord. 
Polydesmida</font></strong></p> 
<ul>
  <li> Fam. Chelodesmidae</li>
  <li>Fam. Xystodesmidae (syn. Devilleidae)</li>
  <li>Gen.<em> Macellolophus</em>
    <ul>
      <li><em>Macellolophus rubromarginatus</em> Lucas 1846</li>
      </ul>
  </li>
  <li>Fam. Paradoxosomatidae (syn. Strongylosomatidae, Strongylosomidae)</li>
  <li>Gen. <em>Boreviulisoma </em></li>
</ul>
cypher
Forum Newbie
Posts: 6
Joined: Thu Sep 18, 2003 3:05 am
Location: San Diego, CA - USA
Contact:

Post by cypher »

The only space I can see is between Ord. Polydesmida and the un-ordered list

What browser are you using? ...
User avatar
igoy
Forum Contributor
Posts: 203
Joined: Fri May 02, 2003 11:57 pm
Location: India
Contact:

Post by igoy »

I'm using IE 6; SP1. and NetScape 7.2.

Both of them shows same result when I copied your Code.
Let me see again..

do you Mean to say that you don't want the extra line space between your title (Ord. Polydesmida) and start of your List (Fam. Chelodesmidae).. rite ?
User avatar
igoy
Forum Contributor
Posts: 203
Joined: Fri May 02, 2003 11:57 pm
Location: India
Contact:

Post by igoy »

Try something Like this... should work for you if don't have any specific reasons for not using table.... :)

Code: Select all

<table width="600" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><strong><font color="#000099">Ord. Polydesmida</font></strong> </td>
  </tr>
  <tr>
    <td><ul>
      <li> Fam. Chelodesmidae</li>
      <li>Fam. Xystodesmidae (syn. Devilleidae)</li>
      <li>Gen.<em> Macellolophus</em>
          <ul>
            <li><em>Macellolophus rubromarginatus</em> Lucas 1846</li>
          </ul>
      </li>
      <li>Fam. Paradoxosomatidae (syn. Strongylosomatidae, Strongylosomidae)</li>
      <li>Gen. <em>Boreviulisoma </em></li>
    </ul></td>
  </tr>
</table>
Unipus
Forum Contributor
Posts: 409
Joined: Tue Aug 26, 2003 2:06 pm
Location: Los Angeles, CA

Post by Unipus »

Except that there's no reason to use a table in that situation.

By default, unordered lists are indented and have vertical margins. You can change this by redefining them in your style sheets. For instance:

Code: Select all

ul &#123; padding: 0px; margin: 0px; &#125;
If you want to start over from scratch and build it to look how you want:

Code: Select all

ul &#123; list-style: none &#125;
You can also apply these and other style rules to LI elements.
User avatar
igoy
Forum Contributor
Posts: 203
Joined: Fri May 02, 2003 11:57 pm
Location: India
Contact:

Post by igoy »

now now.... 8O why didn't I thought of that...
very well unipus... thanks for reminding that.... :idea:
Post Reply