jnf555 Posted April 20, 2009 Share Posted April 20, 2009 hi if a external css is added, does it add style to the whole page or can you link it to a particular div.this is the fomular <link rel="stylesheet" type="text/css" href="styles.css" >thanksjnf555 Link to comment Share on other sites More sharing options...
thescientist Posted April 20, 2009 Share Posted April 20, 2009 If you have a stylesheet it will apply style elements to whichever ones you have specified within it. However, if, say you want certain <p>'s to be green, and other <p>'s to be blue, you need to use what are called classes in your stylesheet. For defining unique elements, you would want to use 'id'. Check out the CSS tutorials on w3schools for all the necessary info to get you going on CSS. if you wanted to only change the style of a div, then it would something like CSS#link_container{ width: 800px; margin: auto; border-style: none;}and HTML<div id="link_container"> <ul> <li><a href="index.php">HOME</a></li> <li><a href="analog.php">ANALOG</a></li> <li><a href="shows.php">SHOWS</a></li> <li><a href="artists.php">ARTISTS</a></li> <li><a href="pictures.php">PHOTOS</a></li> <li><a href="studio.php">THE STUDIO</a></li> </ul></div> that's for my navigation.You can have multiple stylesheet's referenced too. Link to comment Share on other sites More sharing options...
An Alien Posted April 21, 2009 Share Posted April 21, 2009 An external sheet works the same as an internal sheet. Link to comment Share on other sites More sharing options...
jnf555 Posted April 21, 2009 Author Share Posted April 21, 2009 thanks guysjnf555 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.