Jump to content

Help, how I do style this link?


Amazin

Recommended Posts

 

<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 by Amazin
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...