Solved

Unordered List apacing in IE and Firefox

Posted on 2006-06-25
4
938 Views
Last Modified: 2008-03-28
Hi,

I have a simple ul set up in html as follows :

        <ul>
             <li>Point One</li>
             <li>Point Two</li>
             <li>Point Three</li>
             <li>Point Four</li>
       </ul>


and in my CSS for the ul all I have is :

ul
{
  list-style-image: url(pathtogif/bull.gif);
  list-style-type: circle;
}

In Firefox this shows as nicely indented list using my gif.  In IE it also indents it (which I want), however, the spacing between the bukket points in IE is greatly reduced.

I guess I have a couple of questions :

a) What is the default padding/margin that it is applying

b) What values do I need to set in my CSS so that IE renders the list in the same way as Firefox ie. slightly more space between each li item

Cheers
0
Comment
Question by:JoHarris
[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
4 Comments
 
LVL 30

Accepted Solution

by:
GrandSchtroumpf earned 250 total points
ID: 16978269
Note the the "bullet" is called a "marker".

Its location is controlled by the "marker-offset" CSS property:
http://www.blooberry.com/indexdot/css/properties/list/markeroff.htm

Unfortunately, a lot of browsers don't support that property...  If i remember correctly Opera supports it.  I don't know about Safari.

You can try adding some padding-left to the <li>...
Another solution is to use your image as background-image on your <li> and combine that with some margins and padding then you should get consistant behaviour on all browsers.

The default marker offset is completely different in IE and FF.  Seems like one calculates it from the left of the marker, the other from the right of the marker.  No matter what you do, you'll get inconsitant behaviour
0
 

Author Comment

by:JoHarris
ID: 16979117
Thanks for that.  How about the vertical spacing - is this a know problem too.

For example in ie the list displays as follows:

Point One
Point Two
Point Three
Point Four

Where as firefox displays it with more vertical space :

Point One

Point Two

Point Three

Point Four
0
 
LVL 30

Expert Comment

by:GrandSchtroumpf
ID: 16979905
using image markers is known to be inconsistant.
maybe you can use a background-image instead.
if you need to use one browser as a reference, use Opera or Safari... those are the browsers that best respect the standards.  Firefox is pretty good at respecting the standards too, but still has some bugs/mistakes, especially with lists items.
0
 

Author Comment

by:JoHarris
ID: 17004165
That's smashing - thanks for the help!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

730 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