- Related Questions & Answers
- Selected Reading

Participate in discussions with other Treehouse members and learn. Student 5,329 Points Posted June 10, 2013 8:51pm by L McLean. L McLean Pro Student 5,329 Points css external stylesheet and background image. I finished the CSS deep dive and I am now attempting to build a new site within sublime text. Not an internal one. Setting up multiple schemes. This involves using CSS classes, and is quite simple.You just choose a name for your class (for example, “nav”), and put this name (and a dot) in with the link part, like so. You can only do this with the absolute path. I tried with the relative path but it didn’t work. So first of all let’s read the CSS and the HTML from physically located files. Var cssText = System.IO.File.ReadAllText (@'C: HTMLtoPDFApplication HTMLtoPDFApp Resources CSS grace.css'). I'm assuming that the culprit is the asset helper. Straight from the docs: The asset function generates a URL for an asset using the current scheme of the request (HTTP or HTTPS).

CSS allows us to link external style sheets to our files. This helps us make changes to CSS separately and improves the page load time. External files are specified in <link> tag inside <head> of the document.


Syntax
The syntax for including external CSS is as follows.
Example
The following examples illustrate how CSS files are embedded &miuns;
Html2pdf Css
HTML file
CSS file
Output
This gives the following output −
Html2pdf Css Stylesheet Link Html
Example
HTML file
CSS file
Output
Html2pdf Css Stylesheet Links
This gives the following output −