• Advertisement
Sign in to follow this  

[web] Linking Style Sheets to pages for re-use

This topic is 4089 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to make a page for me and some friends. I have a little experience with HTML but here recently I have been trying to learn how to use CSS with my pages. I have been using a website to help me along with this, but it doesn't seem to have anything else on how to link a CSS to your page. I was using a line of code to link the page that looked like this: <link rel=stylesheet href:"www.mywebsite.com/directory/subdirectory/textfile.css" type="text/css"> i put this line of code in between the <head> and </head> tags, yet there was no change in my page, it still looks bland... anyone know what I can do to fix this problem, or atlest get my style sheet to link with my page?

Share this post


Link to post
Share on other sites
Advertisement
Your href attribute is followed by : Change this to = like rel and type. Also, throw http:// in front of the www

See if this helps any.

Edit: Also, if the file exists on the same server as the HTML file, then you should use relative paths. For instance, if you had a folder named "css" (yoursite.com/css) and you have your HTML files in the web root folder (yoursite.com/), then you would link the file like this:

<link rel=stylesheet href="css/style.css" type="text/css">

Link Tag
CSS Tutorials

Share this post


Link to post
Share on other sites
href:"www.mywebsite.com/directory/subdirectory/textfile.css"

should be

href="http://www.mywebsite.com/directory/subdirectory/textfile.css"

to work correctly.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement