hai fndz,
i face alignment problems vth css...
anyone can help me.....in mozilla,but not striaght it show space between bullet symbols&text area...In IE7 ,no space between bullet symbol&text area...the pics are shown below (if any one ask code i also put it).how 2 correct alignment??/
plz help me.............
Thank you

Attachments alignment_not_straight2bullet_textfield(mozilla).JPG 148.18 KB alignment_problemmarkedin_ie7.JPG 137.78 KB remove_bullet_symbol_in_ie7pic.JPG 129.05 KB
7 Years
Discussion Span
Last Post by ko ko

Are you using the list-item and image as list-style-image? I think so, this is very hard to control the position of the list-item to the same result for all browsers. I don't like to use list-style-image. Use the image as background of the list-item and give them vertical position of 50% and it'll fine on all browsers. Here is example:

ul {
list-style: none; margin: 0; padding: 0 /* margin and padding were not the same in all browsers, I set 0 for the same result */; width: auto }
ul li {
list-style: none; margin: 0; padding-left: 1.4em; background: url('list-item.gif') no-repeat 3pt 50%; line-height: 2.4em }

	<li><a href="#">ON Time</a></li>
	<li><a href="#">Per Specification</a></li>
	<li><a href="#">ON Cost</a></li>
	<li><a href="#">Shared Risk</a></li>

You can also use the image for the anchor link background.

a {background: url('list-item.gif') no-repeat 0 50% }

Good luck...


THANK U FOR giving response but i want to change both list style image items&background images.the code is below for that thumbainails

	list-style-image: url('../images/bullet-blue-normal.png');
	margin:5px 40px 10px 0px;
	border:1px solid #ccc;
	background: url('../images/list-bg-large.png') repeat-x;
vertical-align: middle;

Dear chowdarysmk, thank for reply. I correct some code in your css shown by red color, please try with these. And there is no vertical-align for block level elements. So, the vertical-align for li was ignore. I don't know exactly what your problem was, but I think it is the vertical alignment between text and marker(list-image). You can't set the vertical alignment of the marker, but line-height property available in IE.

list-style-image: url('../images/bullet-blue-large.png');
	margin: 0;
        padding: 0;
	font:1.4em/1.5 "Trajan Pro","Times New Roman", Times, serif;
.large-bul li{
	background:url('../images/list-bg-other.png') -11px 0px no-repeat;/*leave spaces between each of value in short hand declaration*/	
	padding:5px 10px 10px 10px;
        line-height: 38px; /*Work with IE*/

And never forget the DOC type. Good luck..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.