I was tasked with changing a bit of css for a site that I did not create, and quite old. In short, building a site from scratch is not an option. There are two CSS stylesheets associated with the site. I tried to combine them with no luck. The first stylesheet is declared in the main section of the document as usual. The second seems to be extracted from the following code:
<script type="text/javascript">
<!--
function P7_StyleLoader(tS) {
var tH = '',
tDoc = '',
tA = '<LIN' + 'K REL="stylesheet" HREF=',
tB = ' TYPE="text/css">';
if (document.getElementsByTagName) {
var bb = document.getElementsByTagName("LINK");
if (bb) {
for (var k = 0; k < bb.length; k++) {
if (bb[k].rel.toLowerCase() == "stylesheet") {
var h = bb[k].href,
x = h.lastIndexOf("/");
if (x > 0) {
tH = h.substring(0, x + 1);
}
bb[k].disabled = true;
tDoc = tA + '"' + tH + tS + '"' + tB;
document.write(tDoc);
break;
}
}
}
}
}
P7_StyleLoader('STYLE-SHEET-2.css');
</script>
if I combine them and drop one of these stylesheets from html, the site will break down pretty much in terms of layout. Can someone tell me if the above code does something else besides just pulling "STYLE-SHEET-2.css"? My thinking is that I would like to use either the above code, or embed other styles in it, or vice versa? Did I miss something?
!