?
Solved

Unordered List apacing in IE and Firefox

Posted on 2006-06-25
4
Medium Priority
?
951 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 1000 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

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…
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
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).
Suggested Courses
Course of the Month11 days, 5 hours left to enroll

770 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