4 replies [Last post]
jtb
Offline
newbie
Last seen: 17 years 2 weeks ago
Joined: 2004-01-08
Posts: 2
Points: 0

Using a images to replace bullets

ul { list-style-image: url("arrow.gif"); }

...but the images do not lined up vertically with the text--in IE the images are slightly higher than center, in NN the images appear centered.

Is there a way to vertically center these bulleted images? Or a better way to replace the standard bullets with images?

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 17 years 10 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

CSS images for bullets

try vertical-align: middle;

Regards
Day

The only way to learn is to do it yourself

jtb
Offline
newbie
Last seen: 17 years 2 weeks ago
Joined: 2004-01-08
Posts: 2
Points: 0

CSS images for bullets

thanks for the suggestion, but that does not appear to change the alignment.

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 17 years 10 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

CSS images for bullets

hmmm I found that MOZ should not have a problem but IE does.

have a look at this link they use an alternative. http://www.bigbaer.com/css_tutorials/unordered.list.item.marker.styles.htm

Regards
Day

The only way to learn is to do it yourself

123dhs321
Offline
Regular
Last seen: 16 years 51 weeks ago
Joined: 2004-01-29
Posts: 26
Points: 0

CSS images for bullets

Try something like this:

#maincontent ol, #maincontent ul	{
	margin: 0.5em;
	padding-left: 10px;
	margin-left: 10px;
	}
	
#maincontent li	{
	line-height: 1.4;
	margin-bottom: 10px;
	padding-left: 5px;
	margin-left: 5px;
	list-style: disc url(../images/i/list.gif) inside;
	vertical-align: top;
	}
	
#maincontent ul ul li {
	margin-top: 10px;
	list-style: disc url(../images/i/inner.gif) inside;
	vertical-align: top;
	}

#maincontent ol.coder {
	font-family: "Courier New", Courier, monospace;
	margin-top: 10px;
	list-style-image: none !important;
	list-style: decimal outside !important;
	padding-left: 1em !important;
	margin-left: 1em !important;
	vertical-align: top;
	}

.coder li {
	background-color: #f5f5f5;
	border-bottom: 1px solid #ddd;
	margin-bottom: 0 !important;
	padding: 2px !important;
	margin-left: 0 !important;
	list-style-image: none !important;
	list-style: decimal outside !important;
	vertical-align: top;
	}

.coder li.two {
	background-color: #eee;
	}
	
#maincontent ul.inlinelist	{
	padding: 0;
	margin: 0;
	}

#maincontent .inlinelist li	{
	display: inline;
	padding: 0 5px 0 0;
	margin: 0;
	border: 0;
	}