December 27, 201015 yr Is there some sort of code to link the two? Do I have to do something different in a text editor to make the pages link? Do I have to position the CSS file somewhere different in the site folder? Cheers
December 27, 201015 yr Yes you can do this. Put css in different folder and give that link to <link> tag. Thanks
December 27, 201015 yr <link rel="stylesheet" type="text/css" href="url-to-your-stylesheet.css" /> This piece of code needs to go inside your <head> tag. Edited December 27, 201015 yr by MarkJenner
December 27, 201015 yr Where MarkJenner says href="url-to-your-stylesheet.css it may be easier for you to put the stylesheet in the same folder as the html file (and the same directory online at the server) so then the link will be simpler, for a stylesheet named styles.css it would be <link rel="stylesheet" type="text/css" href="styles.css" /> If you have the stylesheet in a separate folder/directory the path will be different. If the folder/directory is called css and this folder is inside the folder with the html file (ie lower level) the code would be:- <link rel="stylesheet" type="text/css" href="css/styles.css" /> and if the css folder/directory is at the same level as the folder/directory with the html file (ie both inside the root folder/directory) the link will be:- <link rel="stylesheet" type="text/css" href="../css/styles.css" />
Create an account or sign in to comment