You are here: Re: Backgroun-repeat in IE doesn't work « HTML « IT news, forums, messages
Re: Backgroun-repeat in IE doesn't work

Posted by Jonathan N. Little on 07/26/06 15:41

jojo wrote:
> TC wrote:
>
>>> The problem is: I created a CSS class for external links, they show an
>>> icon at the right, like the blue one in Wikipedia. It all works fine in
>>> FF, but IE seems to ignore the background-repeat:no-repeat and it looks
>>> like he is starting the image on the left instead of the right
>>> (background-position: center right;)
>>>
>>> a.external {padding-right:18px; background: url(external.gif) center
>>> right no-repeat;}
>>
>> Coincidentally, I've just been testing the exact same thing for my own
>> site. This works fine for me in IE6:
>>
>> .extlink { background: url(extlink.gif) no-repeat right center;
>> padding-right: 12px; }
>>
>> Could it be the order of your 'background' attributes?
>
> I think no. I specified them all alone (background-image:url(external.gif);
> background-repeat:no-repeat;
> background-position:center right;), same result.

Isolating your style .external and link code works fine in both FF and IE

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>test</title>

<style type="text/css">
a.external {padding-right:18px; background: url(external.gif) center
right no-repeat; }
</style>
</head>
<body>
<p class="normal">Normal<br>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat. Ut wisi enim ad minim
veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut
aliquip ex ea commodo
consequat. <a href="#" class="external">Externer Link</a>
</p>

</body>
</html>

but your multiple stylesheets are very complex so you have a conflicting
rule somewhere, my advice is:

1) in DOM inspector see that the specified and computed style for the
link is

2) strip stylesheets to minimum and then add bit incrementally and test
to isolate where the problem is... tedious but effective when your have
so many variables....

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация