Did you place the html file in the base folder in CMS, or did you place it into a subfolder?
For example assume I placed xxx.html into the webapp folder, and then main.css into the webapp/docs/css folder. I would have to change my css reference to:
By the way, I am assuming that you also uploaded the CSS file.
I have folder structure docs/documentation under the root folder. Html called index.html is placed under documentation folder. CSS called main.css is placed under docs/css folder.
Yes, I have uploaded the CSS file :)
I did a little more research and it appears that when CMS uploads an HTML file, it extracts and stores only the contents between the < body > ...< /body > tags. (Or perhaps it does this when the HTML page is displayed.) This means that the stylesheet link is not in the displayed output, hence your stylesheet will not be referenced.
It looks like only way to apply style to the html content is to embed the styles in the html document itself. Am I right ?
style tags are filtered out of the content stored by the cms. This is so that the CMS Portlet which displays the content as portlet markup.
With a style tag in there the markup would become invalid....Although maybe some browsers could still be forgiving...
anyways, the best way is to add the style reference to the JSP page that performs the layout for your portal.
In the default portal this is jboss-portal.sar/portal-core.war/layouts/generic/index.jsp and maximized.jsp
Thanks for all the inputs. I am using header injection using jboss-portlet.xml to include styles.