I have a javascript file, and one of its functions is to create some HTML using javascript.
The HTML is created at runtime and creates the following element:
var oBox = document.createElement("notifiedusersbubble");
oBox.style.color="#808080";
oBox.style.display = "none";
oBox.style.position= "absolute";
oBox.style.width="200px";
oBox.style.border = '1px solid black';
oBox.style.background = "#DDEFF1";
oBox.style.fontFamily="arial,sans-serif";
oBox.style.padding="2px 2px 2px 4px";
Instead of leaving all the styling inside the javascript file, I want to put t in the CSS file and reference it from there.
The problem is, I do not know how to do this using javascript. I know that to do so using HTML I would write the following inside the <head>
tag:
<link href="style.css" rel="stylesheet" type="text/css" />