Thanks for your posts, "iusemodx".
I tried, your code but it did not work any better with Internet Explorer 8.
In fact, all styles are correctly applied to the <li> element, typically the translucent background colors, with my code too.
What is not applied to the visited link, once it was visited and for Internet Explorer 8 only, are all styles for the <a> element, like the line-height or the color in this case.
I have a more generic style for anchors somewhere, upper in the cascading:
It's possible that Internet Explorer forgets to do the whole cascading of styles when displaying visited links ; I have not tested.
I solved the styling bug by adding a <span> sandwich inside the anchor and adding the following style:
.menu ul li a span {
color:#fff;
}
Concerning the translucent backgrounds, the code I use is compatible with many browsers. hsla colors are currently not supported by Internet Explorer, but this browser supports the first three styles in this line:
background:solid;background-color:#e00;filter:alpha(opacity=65);background: hsla(1, 100%, 50%, 0.65)
In most browsers, the background style is then replaced by the hsla(...), and IE simply ignores it.
The same for the text-shadow and z-index properties.
IE simply ignores them, so they aren't a problem.
text-shadow makes the text easier to read in other browsers like Firefox and Safari, especially for white text, as it smoothes the contours.
I was not aware of the "+" selector that you use to style the second and third <li> elements. Very nice,thanks.
In the current project however, I define the colors inline: <li style="{{[+fond_colore+]}}"> with a TV calling a chunk where some predefined colors is stored. This permits to edit the colors from within MODx.
IE 8 is important as this is the last version of Internet Explorer supported by Windows XP, and yes there are still guys like me using it!