turtle Posted April 8, 2010 Share Posted April 8, 2010 Help please!I am trying to add link styles across all my pages using an stylesheet but I can't get it to work. It only works if I put it individually to every single page but this is very time consuming especially if I have to make any changes. Thank you.Here is my stylesheet:.wrapper{ margin: 0px auto; width: 900px; background-color: #cccccc;}.header{ float: left; width: 100%; height: 200px; background-color: #6699cc;}.content{ float: left; width: 100%; height: 500px; background-color: #ffffff;}.footer{ float: left; width: 100%; height: 70px; background-color: #6699cc;}body { padding: 10px; margin: 10px; font-size: 90%; background-color: #6699cc;}a:link { color: #CCC;}a:visited { color: #69C;}a:hover { color: #00F;}a:active { color: #CCC;} Link to comment Share on other sites More sharing options...
real_illusions Posted April 8, 2010 Share Posted April 8, 2010 Theres 2 ways:<style type="text/css" media="all">@import url(css/stylesheet.css);</style> Or the more 'traditional' way:<link rel="stylesheet" type="text/css" href="css/stylsheet.css" media="screen" />Notice the media attribute, 'screen' is for normal monitors and 'all' is for everything, so that includes mobile devices. While its a good idea to use this, its not mandatory to have it. But its useful for a dedicated printing CSS file, eg: media="print"Both of these tags go into the head section of each page. Just make sure the path is correct to the CSS file. These 2 examples assumes (and you should) stick your CSS in a seperate folder, this time called 'css'.Hope that helps Link to comment Share on other sites More sharing options...
turtle Posted April 8, 2010 Author Share Posted April 8, 2010 MANY THANKS, IT HAS WORKED! Theres 2 ways:<style type="text/css" media="all">@import url(css/stylesheet.css);</style> Or the more 'traditional' way:<link rel="stylesheet" type="text/css" href="css/stylsheet.css" media="screen" />Notice the media attribute, 'screen' is for normal monitors and 'all' is for everything, so that includes mobile devices. While its a good idea to use this, its not mandatory to have it. But its useful for a dedicated printing CSS file, eg: media="print"Both of these tags go into the head section of each page. Just make sure the path is correct to the CSS file. These 2 examples assumes (and you should) stick your CSS in a seperate folder, this time called 'css'.Hope that helps Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.