Amazin Posted October 18, 2014 Share Posted October 18, 2014 (edited) <header><link rel="stylesheet" type="text/css" href="mydesign.css"><H1>This is my world</H1><nav><a href="about.html">about</a></nav></header> the bit in red, basically I created a link to another page called "about". It is part of the navigation links in my header. As you can see the part in blue that I already created a link to an external CSS file. here is the file (mydesign): H1 {border-style: solid; text-align: center; border-width: 5px; color: #00ff00;}body {background-color: #33CCFF; background-image: url(burger.JPG); background-size: 1200px 650px; background-repeat: no-repeat; background-position: center; background-attachment: fixed;}p {text-align: center;color: #00ff00;}#about {text-align: center; color: red;} As you can see the part in green that I tried to use the CSS selector to select "about" but no luck:( Edited October 18, 2014 by Amazin Link to comment Share on other sites More sharing options...
dsonesuk Posted October 18, 2014 Share Posted October 18, 2014 #about means it targets a element with id ref of 'about' i.e. id="about", no such reference on link, means no worky. Link to comment Share on other sites More sharing options...
Ingolme Posted October 18, 2014 Share Posted October 18, 2014 You need to learn CSS selectors. There are only two main things in CSS: selectors and rules. If you don't know how selectors work then you don't know half of CSS. Link to comment Share on other sites More sharing options...
darkofman Posted October 19, 2014 Share Posted October 19, 2014 first : # is only of id I believe seconde : instead of #about , use a, or give your link an id like <a href="about.html" id="yep">about</a> then use the # so its should be like this #yep { color:red; } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now