Adding the following to style.css

#banner img {
  behavior: url(css/png-fix.htc);
}

and placing the other attachements like this:

site/src/site/resources/css/
  png-fix.htc
site/src/site/resources/images/
  transparent.gif

solves the problem for the top level HTML files...  perhaps the banner
generation from the Maven template can be overwritten resulting in a
more robust solution.  Here I have problems with loading the behaviour
via the CSS file from other directories.

Regards,
Arvid
<public:component lightWeight="true">
<public:attach event="onpropertychange" onEvent="propertyChanged()" />
<script>
/*
 * Based on 
 * http://www.mongus.net/pngInfo/
 * and
 * http://webfx.eae.net/dhtml/pngbehavior/pngbehavior.html
 *
 */

        var gNeedFix = needFix();

        var transparentImage = "transparent.gif";

        pngFix();

        function propertyChanged() {
                if (event.propertyName == "src") {
                        pngFix();
          }
        }

        function pngFix() {
                if (!gNeedFix) {
                        return;
                }

                var src = element.src;

                if (src.indexOf(transparentImage) != -1) {
                        return;
                }

                if (src.indexOf(".png") == -1) {
                        return;
                }

    var w = element.width;
    var h = element.height;
                element.src = src.substring(0, src.lastIndexOf('/') + 1)  + 
transparentImage;
    element.width = w;
    element.height = h;
                element.runtimeStyle.filter = 
"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + 
"',sizingMethod='scale')";
        }

        function needFix() {
                var pos = navigator.userAgent.indexOf("MSIE ");
                if (pos == -1) {
                        return false;
                }
                var version = navigator.userAgent.substring(pos + 5);
                return (((version.indexOf("5.5") == 0) || (version.indexOf("6") 
== 0)) && (navigator.platform == ("Win32")));
        }

</script>
</public:component>

GIF image

body {
        background-color: #fff;
	font-family: Verdana, Helvetica, Arial, sans-serif;
	margin-left: auto;
	margin-right: auto;
	background-repeat: repeat-y;
	font-size: 13px;
	padding: 0px;
}
td, select, input, li{
	font-family: Verdana, Helvetica, Arial, sans-serif;
	font-size: 12px;
	color:#333333;
}
code{
  font-size: 12px;
}
a {
  text-decoration: none;
}
a:link {
  color:#47a;
}
a:visited  {
  color:#666666;
}
a:active, a:hover {
  color:#990000;
}
#legend li.externalLink {
  background: url(../images/external.png) left top no-repeat;
  padding-left: 18px;
}
a.externalLink, a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover {
  background: url(../images/external.png) right center no-repeat;
  padding-right: 18px;
}
#legend li.newWindow {
  background: url(../images/newwindow.png) left top no-repeat;
  padding-left: 18px;
}
a.newWindow, a.newWindow:link, a.newWindow:visited, a.newWindow:active, a.newWindow:hover {
  background: url(../images/newwindow.png) right center no-repeat;
  padding-right: 18px;
}
h2 {
	font-size: 17px;
	color: #333333;  
}
h3 {
	padding: 4px 4px 4px 24px;
	color: #666666;
	background-color: #CECECE;
	font-weight: bold;
	font-size: 14px;
	background-image: url(../images/h3.jpg);
	background-repeat: no-repeat;
	background-position: left bottom;
}
p {
  line-height: 1.3em;
  font-size: 12px;
  color: #000;
}
#breadcrumbs {
	color: #DDDDDD;
	padding: 5px 5px 5px 5px;
}

* html #breadcrumbs {
	padding-bottom: 8px;
}
#leftColumn {
  background-color: #B2C4E0;
}
#navcolumn h5 {
	font-size: smaller;
	border-bottom: 1px solid #aaaaaa;
	padding-top: 2px;
	padding-left: 9px;
	color: #49635a;
	background-image: url(../images/h5.gif);
	background-repeat: no-repeat;
	background-position: left bottom;
}

table.bodyTable th {
  color: white;
  background-color: #999999;
  text-align: left;
  font-weight: bold;
}

table.bodyTable th, table.bodyTable td {
  font-size: 11px;
}

table.bodyTable tr.a {
  background-color: #ddd;
}

table.bodyTable tr.b {
  background-color: #eee;
}

.source {
  border: 1px solid #999;
  overflow:auto
}
dt {
	padding: 4px 4px 4px 24px;
	color: #333333;
	background-color: #ccc;
	font-weight: bold;
	font-size: 14px;
	background-image: url(../images/h3.jpg);
	background-repeat: no-repeat;
	background-position: left bottom;
}
.subsectionTitle {
	font-size: 13px;
	font-weight: bold;
	color: #666;

}

table {
	font-size: 10px;
}
.xright a:link, .xright a:visited, .xright a:active {
  color: #666;
}
.xright a:hover {
  color: #003300;
}
#banner {
	background-color: #B5C8CF;
	border-bottom: 1px solid #B5C8CF;
}
#navcolumn ul {
	margin: 5px 0 15px -0em;
}
#navcolumn ul a {
	color: #333333;
}
#navcolumn ul a:hover {
	color: red;
}
#intro {
	border: solid #ccc 1px;
	margin: 6px 0px 0px 0px;
	padding: 10px 40px 10px 40px;
}
.subsection {
	margin-left: 3px;
	color: #333333;
}

.subsection p {
	font-size: 12px;
}
#footer {
  padding: 10px;
  margin: 20px 0px 20px 0px;
  border-top: solid #ccc 1px; 
  color: #333333;
}


dl {
  padding: 0px 0px 5px 0px;
  border: 0px;
  background: url(../images/dl.jpg) left top no-repeat
}

dt {
  padding: 0px 0px 0px 25px;
  border: 0px;
  background-color: #FFFFFF;
}

div#leftColumn {
  background: #F0F0F0;
  border-color: #999 #999 #999 #999;
  border-width: 1px;
  border-style: solid;
}



#breadcrumbs{
  background: #F0F0F0;
  color: #000000; 
}

#banner img {
  behavior: url(css/png-fix.htc);
}

Reply via email to