Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add css style sheet to app_offline

Well, I'm trying to make custom app_offline.htm and want to add links to my css files in project. But next code doesn't work

<link href="/Content/Themes/screen.css" rel="stylesheet" type="text/css" />

In console I've got error

GET mySite/Content/Themes/screen.css 503 (Service Unavailable)

Please, give me advise how to make a link to css file in app_ofline.htm. Any help will greatly appriciated!

like image 434
JohnyMotorhead Avatar asked Jul 12 '12 13:07

JohnyMotorhead


People also ask

How do I add a CSS stylesheet to Visual Studio?

In Solution Explorer, right-click the name of the Web site, and then click Add New Item. In the list of templates, select Style Sheet. In the Name box, type Layout. css, and then click Add.

How do I attach a stylesheet?

External stylesheets use the <link> tag inside the head element. The rel attribute explains the relation the link has to our document. The value in this case will always be stylesheet , since that is what we're creating a link to. The href attribute is the link to our stylesheet.


1 Answers

The idea of the app_offline.htm is that it indicates that the app is, well, offline. So, no resources are available from the site when the site is offline. Either put the relevant rules into the page or host the stylesheet on a separate domain.

like image 127
saluce Avatar answered Sep 23 '22 13:09

saluce