RoastHorse Tutorials

[Home] [Instructions] [Support]

These files Are examples only of CSS and Javascript techniques that you can use in your own work. I have deliberately put very little effort into making the examples attractive, so as to not confuse the important elements. You should be able to incorporate these techniques into your own designs and add your own styles.

I have left the CSS styles in the head of each document, again for ease of learning, but this is not the best solution for a live site.
Old browsers like NN4.x do not render some styles properly if at all so I hide all styles from these browsers by keeping all CSS in a separate file. I can then use @import to link to these CSS files. Old browsers don’t understand @import so the styles are not imported and they display plain HTML. Because these browsers don’t use the CSS styles I hide the Javascript functions from them too by checking for getElementById(), new browsers will understand this function and execute the script, old browsers won’t.

@import example:

<style type="text/css">
@import url("path/to/css/file.css");
</style>

JS getElementById() example:

<script type="text/javascript">
if (document.getElementById) {
  //execute this script
}
</script>

If you need any more information or help please use the support form.