Cannot apply external CSS even after providing full URL in HTML string

body {} .table{ background-color:aqua } 

this is my StyleSheet1.css stored in my local in C:\Users\ingyadav\Documents\Visual Studio 2015\Projects\StyleSheet1.css

 <html> <head> <link rel="stylesheet" href="file:///C:/Users/ingyadav/Documents/Visual Studio 2015/Projects/StyleSheet1.css" type="text/css" /> </head> <body> <table class="table" border="1" style="width:300px;height:500px"> <tr style="width:auto"> <td style="width:150px;height:500px"></td> <td> <table border="1" style="width:150px;height:500px"> <tr style="width:auto"><td></td></tr> <tr style="width:auto"><td></td></tr> <tr style="width:auto"><td></td></tr> </table> </td> </tr> </table> </body> </html> 

And this is my HTML line to be downloaded in pdf now

when I pass this to the evo html to pdf converter without loading external css to pdf.

in the evopdf support they mentioned to provide the full url, but after using the correct url, the external css also failed to load.

can someone help me with this please.

0
source share
1 answer

No, you cannot specify multiple locations in the href attribute. Beyond the specification, each <link> represents a document that is connected to your html. Therefore, by design, this will be only one document.

Example: https://www.w3.org/TR/html401/struct/links.html#h-12.3

0
source

Source: https://habr.com/ru/post/951138/


All Articles