Topic: list-style woes in IE (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=27424" title="Pages that link to Topic: list-style woes in IE (Page 1 of 1)" rel="nofollow" >Topic: list-style woes in IE <span class="small">(Page 1 of 1)</span>\

 
GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 01-31-2006 17:35

hello, i use

list-style: url(.....gif) circle }

to set a nice colored button for my list items.

the problem is that in IE this graphic is very close to the beginning of the text, while in FF and OP it is some pixel away from that.

is there a way to move the button in IE some pixels to the left, without adding extra pixels to the image itself, cause that would cause the button to move leftwards in FF and OP too.

thanks!

Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 01-31-2006 17:41

so... you have played with the margin and padding? That'd be my first try.

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 01-31-2006 17:56

no.
i didnt know you can set margin and padding on li.

i'll try it now. thanks TP!

edit: typo



(Edited by GRUMBLE on 01-31-2006 18:04)

F1_error
Paranoid (IV) Mad Scientist

From: EN27
Insane since: Mar 2000

posted posted 01-31-2006 19:30

Failing that, you could make your gif slightly wider (with a transparent edge), and that would work as well.

reisio
Paranoid (IV) Inmate

From: Florida
Insane since: Mar 2005

posted posted 01-31-2006 19:50

list-style-image is notoriously crap across different browsers at present - use a background image

DL-44
Lunatic (VI) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 01-31-2006 20:13

^ agreed.

background-image for the li is the way to go.

quote:

GRUMBLE said:

no.
i didnt know you can set margin and padding on li.



Of course - it's a box like any other.



(Edited by DL-44 on 01-31-2006 20:14)

JKMabry
Maniac (V) Inmate

From: raht cheah
Insane since: Aug 2000

posted posted 01-31-2006 22:44

a third for the background-image, much less frustrating

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 02-01-2006 13:00

thanks guys, but whatever solution i use, the offset is still something different in IE than in FF or OP.

all i want is to have my list look the same in all three major browsers.

this is the current code i use:

code:
li.bullet {
	list-style-type:none;
	background-image:url(.....gif);
	background-repeat:no-repeat;
	background-position: 0px 4px;
	padding-left:5px;
	margin-left:0px;
}



kuckus
Paranoid (IV) Mad Librarian

From: Glieberlermany
Insane since: Dec 2001

posted posted 02-01-2006 15:40

I'd start with ul, li { margin: 0; padding: 0; } and go from there. Should be gettable pretty close to identical that way

(*cough*)

DL-44
Lunatic (VI) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 02-01-2006 16:08

To go slightly further - start with

code:
ul {
 padding:0;
} 

ul li {
 padding:0;
 margin:0;
}



Adjust the padding and margins on the ul li until you're happy with it.
I would also apply the class to the ul (or even the div or other element that contains it) rather than to the li.

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 02-01-2006 17:23

thanks again guys!
that did the trick!

in case anyone is interested, here is the full code i use now:

code:
ul {
padding:0;
} 

ul li {
padding:0;
margin:0;
}

li.x {
list-style-type:none;
background-image:url(punkt_6.gif);
background-repeat:no-repeat;
background-position: 0px 8px;
padding-left:8px;
}



note to self: always set all paddings, margins and never rely on the default values.

reisio
Paranoid (IV) Inmate

From: Florida
Insane since: Mar 2005

posted posted 02-01-2006 19:16

defaults are okay, as long as you know how each browser does it

http://www.w3.org/TR/CSS21/sample.html is good as a reference if you forget what has what by default (though no browsers follow it strictly, more's the pity)



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu