This is interesting. The attached very simple code gives nice ‘background highlighted’ text in Firefox, but displays no highlighting in IE7 (and possibly others, not yet tested).
The use of such inline elements is important because I’m using them in a grid to highlight important words etc.
Test.html
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link rel="stylesheet" href="Test.css" type="text/css" />
</head>
<body>
This is <hlr>a test</hlr> of the <hlr>highlighting</hlr>
</body>
</html>
Test.css
/*RED Highlighted text.*/
hlr
{
background-color: #FF5555;
font-weight: bold;
font-size:100%;
}
Bizarre! Any thoughts on how to remedy it?
hlr is invalid markup. Try this instead:
then: