-1

I have a different problem I don't know whether my question makes any sense or not, but I would like to get clarified. Actually I have an Embedded device and I will be loading html webpages in the serial flash address location of my device. Those webpages include common css but individually written in each page.Now I want to make a common page for css and link it to each individual web page using link href. I would like to mention the address location(Hexadecimal address) of css file in serial flash using href in html file.

Can I specify like that ?

Will it link to the location of serial flash ?

will my css gets adopted to my webpages?

or can I do it using Javascript ?

If yes, how can I give the address location in href. Please anyone let me know. Thanks in advance.

1 Answers1

0

No need to include the hexadecimal address location. Create the folder you would like to use and place all your files there (html, css,etc). When you brows your index.html it will search from within the same folder and if your css-files are there it is enough with below link in HTML.

<link rel="stylesheet" href="index.css">

If you have created a subdirectory (called css) for your css files you need to add the href like this:

<link rel="stylesheet" href="css/index.css">

Regarding your specific questions:

Can I specify like that ? See above answer.

Will it link to the location of serial flash ? See above answer.

will my css gets adopted to my webpages? If you mean if your HTML file will find your CSS file, - yes, if you put the correct path. If you add it as above it will be relative meaning that you do not have to know nor write out the full path.

or can I do it using Javascript ? You do not need Javascript for solving your issues.

If yes, how can I give the address location in href. No need of Javascript, use relative path as described in above answers.

Toolbox
  • 2,333
  • 12
  • 26