Forum Moderators: not2easy

Message Too Old, No Replies

IE List Background Bug

problems with the dislay

         

yborcityslicker

9:08 pm on Aug 18, 2010 (gmt 0)

10+ Year Member



Hello all,

I am trying to implement code that will automatically add an icon to the end of document links that is working perfectly in Firefox but not in IE.

The list is contained in a sidebar with the following css:

#sidebar-side-1 #sidebar-right {
width: 26%;
float: right;
padding-top: 10px;
}


the module I created has the following css associated with it:

a[href$='.doc'], a[href$='.rtf'] {
padding: 5px 20px 5px 0;
background: transparent url(files_icons/icon_doc.gif) no-repeat center right;
}


This sidebar is an unordered list of about 15 items. When the item description is contained on a single line, the display is correct (an icon 20px away from the link) but when the description wraps to multiple lines, the icon is placed at the center of the ENTIRE list item.

I tried to add position: relative; to the ul css, but the only difference it does is remove the icon when the link wraps to multiple lines. Any help on fixing this would be greatly appreciated.

alias

1:56 pm on Aug 20, 2010 (gmt 0)

10+ Year Member



Debug down your background property:

background-color: transparent;
background-image: url(img.gif);
background-repeat: no-repeat;

background-position: center right;

"center right"? The first value is for the horizontal axis, the second value is for the vertical axis. Center for horizontal -- ok. Right for vertical axis? -- not possible, is it? That's why it defaults to the default "center center";

Just adjust the vertical axis value, and you should be fine.