i have tried a bunch of methods a few bellow:
aswell as a slightly more complex one.Code:<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link id="myid" rel="stylesheet" type="text/css" media="screen" /> <script type="text/javascript"> sigh=document.getElementById('myid'); sigh.setAttribute('href', 'css/bg.css'); </script> </head>
i have tried a massive amount of different scripts. just cant seem to get it right im not sure if its me or what.Code:function css(source) { create = document.createElement('link'); create.setAttribute('rel' , 'stylesheet'); create.setAttribute('type' , 'text/css'); create.setAttribute('href' , source); document.childNodes[0].appendChild(create); ; } if (!window.ie) { css('/css/bg.css'); }
thanks for looking
-nick


Reply With Quote
Bookmarks