SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: Problem with lists

  1. #1
    SitePoint Evangelist mumford1's Avatar
    Join Date
    Sep 2002
    Location
    UK
    Posts
    551
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with lists

    Hi

    If someone could take a look here please http://www.blinding-designs.co.uk/test.htm

    I have added a <br> in between the line of text to illustrate my problem, in my actual code here i have the lists in a table and when the text reaches the end of the table the same thing happens.

    I won't the bullett image to always line up at the top of the list item text, could someone please help

    thanks!!

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    SitePoint Award Recipient Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    37,781
    Mentioned
    99 Post(s)
    Tagged
    3 Thread(s)
    Hi,

    You could try using a list image instead of the bullet although it doesn't line up centrally in IE.
    Code:
     ul{
     margin-left: 20px;
     padding-left: 0px;
     list-style-type:disc;
     list-style-image:url(http://www.blinding-designs.co.uk/bullett.gif) ;
     list-style-position: outside;
     border:0;
    }
    You will probably need to add a bit of transparent padding to the top of your gif to move it down so that ie looks ok. The problem is that ie and moz display it in a slighly different position and there seems to be no way of correcting it.

    However the list image should stay on the first line like a bullet does.

    Hope it's of some use.

    Paul

  3. #3
    SitePoint Evangelist mumford1's Avatar
    Join Date
    Sep 2002
    Location
    UK
    Posts
    551
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cheers paul, did not really want to go down that route, but looks like i will have to

    thanks again

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    SitePoint Award Recipient Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    37,781
    Mentioned
    99 Post(s)
    Tagged
    3 Thread(s)
    Hi,

    I've been thinking about this and have come up with a simple solution that should do the job.

    Have at look at my answer in this thread:

    http://www.sitepoint.com/forums/show...32#post1114832

    It should do the job.

    Paul

  5. #5
    SitePoint Wizard Crowe's Avatar
    Join Date
    Nov 2001
    Location
    Huntsville
    Posts
    1,117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is how I did it on my site (chrispian.com). I checked it in tons fo browsers and it just works.

    Code:
    .navlist li  {
    	padding-left        : 15px;
    	background-image    : url(http://www.chrispian.com/images/square.gif);
    	background-repeat   : no-repeat;
            background-position : 0 6px;
    }
    Chrispian H. Burks
    Nothing To Say

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    SitePoint Award Recipient Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    37,781
    Mentioned
    99 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by crowe
    Here is how I did it on my site
    Same way as my link

  7. #7
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah so this is the other thread you were referring to Paul. Yes that does work rather consistently and as Paul pointed out, you should use em or % for positioning the background image if you want to provide for resizing text.

  8. #8
    SitePoint Wizard Crowe's Avatar
    Join Date
    Nov 2001
    Location
    Huntsville
    Posts
    1,117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Paul O'B
    Same way as my link
    Doh! I can write, but reading is another ball game
    Chrispian H. Burks
    Nothing To Say

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
  •