Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Unordered List apacing in IE and Firefox

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
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 …
Suggested Courses

636 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