Hi,
I created an HTML file on RStudio Cloud and linked it to a CSS file, in the same directory.
When I preview the HTML file (using the Preview button in the Toolbar), the HTML file gets opened in a pop-up window and the style gets applied. However, if I try to open the file in a browser, the HTML styles do not get applied.
If I specify the style inline, using the tag, it works.
I tried moving the CSS file to a www directory, but that did not work either.
Am I not specifying the CSS file correctly?
Here is a link to the RStudio Cloud project with access to everyone: RStudio Cloud
And here is the code for the HTML and CSS files.
<html>
<head>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class = 'div-class'>
This is blue text
</div>
</body>
</html>
.div-class {
color: blue;
}
Thanks
Manohar