I am currently working with Vert.x. I can easily load the js files needed but when it comes to CSS, nothing loads EVER. So i guess my last resort is to write up some js to set these css rules(super last resort is to write the css INSIDE the html file).
Is there a nice way to do this?
I was thinking something like:
function loadIndexCss()
{
document.getElementById("p2").style.color="blue";
document.getElementById("p2").style.fontFamily="Arial";
document.getElementById("p2").style.fontSize="larger";
}
save that in a file, then:
<script type="text/javascript" src="../css/css.js"></script>
<body onload="loadIndexCss()">
<form id='frm_login'>
<fieldset >
<legend>Admin Login</legend>
<label for='u' >Username: </label>
<input type='text' name='username' id='u' maxlength="25" class="blocky"/>
<label for='p' >Password: </label>
<input type='password' name='password' id='p' maxlength="25" class="blocky"/>
<br/>
<input type='button' name='Login' value='Login' id="btn_login" />
</fieldset>
</form>
</body>
will that even work? if this is stupid, please teach 🙂
Yes, that should work. You can also do it the dirty way, creating named style tag:
and then add the CSS: