Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do you link css to a jade file?

I am currently trying to link normalize.css but its not working (using socket an express)

html         head                 title= "Real time web chat"                 link(href='/css/normalize.css')                 script(src='/chat.js')                 script(src='/socket.io/socket.io.js')                 script(src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js')         body                 #content(style='width: 100%; height: 600px; margin: 0 0 20px 0; border: solid 1px #999; overflow-y: scroll;')                 .controls                         | Name:                          input#name(style='width:350px;')                          input#field(style='width:350px; display: inline; margin-left -90px;')                         input#send(type='button', value='send') 
like image 219
Swat Designz Avatar asked Nov 28 '13 02:11

Swat Designz


People also ask

How do you link a CSS file code?

You can link this external file (. css file) to your HTML document file using the < link > tag . You can place this < link > tag Within the < head > section, and after the < title > element of your HTML file. The value of the rel attribute must be style sheet.

How do I reference a CSS file in the same folder?

If both HTML and CSS files are in the same folder, enter only the file name. Otherwise, include the folder name in which you store the CSS file. media – describes the type of media the CSS styles are optimized for. In this example, we put screen as the attribute value to imply its use for computer screens.

How do I open a jade file?

All jade files need to be transformed in the HTML. Also don't forget that you need to install other dependencie like express, nodemailer, etc (see requires in the source code). And the application should by available on http://localhost/3000. All Jade templates will be correctly rendered and displayed as HTML.


1 Answers

You need rel

link(href='/css/normalize.css', rel='stylesheet') 
like image 144
Khanh Nguyen Avatar answered Oct 12 '22 09:10

Khanh Nguyen