SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Addict
    Join Date
    Sep 2000
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My site has a lot of content including many bulleted lists.
    My problem is that all of the first lines in my <ul>'s list have a small, but noticeable space under them even though I haven't placed a <br> tag.
    e.g.
    <ul>
    <li>sample text</li>
    <li>sample text</li>
    </ul>
    ...between those two lines is a minor space.

    Any ideas on how to fix this problem?

  2. #2
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    meztec...do you need the list indented? If you don't then I would recommend using your <li> tags freefloating. I do it all the time and have never seen browser have a problem with them.

    like this

    <li>first item
    <li>second item

    That *should* get rid of your spacing issue.

  3. #3
    SitePoint Zealot thespian's Avatar
    Join Date
    Sep 2000
    Location
    South Africa
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have a similar problem to meztec.

    I was wondering if CSS might help. I have not used CSS before but was intending to investigate this soon. Maybe someone can advise and hopefully supply a simple example (if CSS will in fact help)

    I was going to attempt to control the line-height and indent-margins of the <LI> tags.

    Am I on the right track or on the road to nowhere?
    Bill Conté [Protected by Psalm 91]
    Web Mechanix
    Growing OLD is Mandatory - Growing UP is Optional!

  4. #4
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thespian...you are on the right track as far as IE 5 is concerned...I will look into this when I get to work tomorrow, but I am almost positive that Netscape does not support style of list elements.

    ill get back with you on that though...look for an edit in this post ok?
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  5. #5
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Netscape 4.7 and higher supports most CSS level one elements which includes margins and indentation.
    Wayne Luke
    ------------


  6. #6
    SitePoint Zealot thespian's Avatar
    Join Date
    Sep 2000
    Location
    South Africa
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanx creole - I'll be watching. BTW - what about IE4?

    That sounds great Wayne - Does this mean that Netscape will handle it (Sorry - but I've never used CSS before and do not know what a level one element is)
    Bill Conté [Protected by Psalm 91]
    Web Mechanix
    Growing OLD is Mandatory - Growing UP is Optional!

  7. #7
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thespian...

    I gave it a try here at work where my resource materials are (Web Designers Guide to Stylesheets) an excellent book!

    Anyway...tested with IE 5 and NS 4.74 both for Mac.

    Both browsers allowed me to style UL and OL elements, however, nothing I could do would get rid of that initial space after the open UL but before the first LI.

    your best bet would be to use the method I listed above.

    Code:
    Descriptive text here
    **<li>item one here
    &nbsp;&nbsp;<li>item two here
    That will give you the indent you are looking for without the extra space before and after the UL tag. Add more nonbreaking spaces if you want more indent


    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  8. #8
    SitePoint Addict
    Join Date
    Feb 2000
    Location
    Minnesota
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have the perfect solution for you!
    Here is a nifty little trick I use when I want a bulleted list without the mandatory spaces afterwards.

    You have to use Character entities instead of <ul> and <li>.
    Character entities are used to specify characters that are not found in the normal alphanumeric character set, such as copyright symbols. These are usually defined by name (&name;) or by numeric value (&#123;) in HTML.

    Specifically, the character entity you want to use is &#149. This will display a bullet. Now, simply increase the font size and bold it so it appears exactly like bullets you get from using <ul> and <li>. Now by using some spacing to mimic the indentation, you can give it the appearance of a bulleted list without having the line space afterwards.

    Instead of:
    <ul>
    <li>asdf</li>
    <li>asdf</li>
    </ul>

    Do this:
    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font size="3">
    <font face="Arial"><b>•</b></font></font>asdf
    <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font face="Arial" size="2"><b><font size="3">•</font></b></font>asdf</p>

    Hope this helps
    -Hideki


  9. #9
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hideki....that accomplishes the same thing my solution does...just with more code involved...hehehe
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  10. #10
    SitePoint Addict
    Join Date
    Oct 2000
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sometimes it's easier just to dodge the bullets... lol. (I crack me up.)

    Usually, if the dimensioning is critical, I just make up a small bullet graphic and stuff everything in table cells.

  11. #11
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    tables? what are those?

    LOL
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  12. #12
    SitePoint Addict
    Join Date
    Oct 2000
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tables are those flat things in dining rooms. Sorry I brought them up... didn't mean to go off topic by talking about furniture.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •