Hi
I've added a link to my document which is fine but now i need a different link on the same document with different styles.
I've created 2 different external style sheets in css with 'link,hover,active' etc but just can't seem to solve it...
Any help would be much appreciated!!
Trying to create 2 different links on...Give one or both of your links a class or id ( e.g. %26lt;a href=''books.php'' class=''mylink1''%26gt;Books%26lt;/a%26gt; ).
Then create a css rule for one or both of them using -?.mylink1 { your css rule goes here } for class or #mylink1 { your css rule goes here } for id, and reflect any different style(s) in this.
PZ
Trying to create 2 different links on...Yes, as above, custom class links are what you want. Let's say you have two areas you want styled differently; sidenav and footer. Create these divs and add someting along these lines to your css:
.sidenav {
color: #F00;
}
.sidenav a:link {
colour: #F0F;
text-decoration: none;
}
.sidenav a:visited {
colour: #FF00F0;
text-decoration: none;
}
.sidenav a:hover {
colour: #F00;
text-decoration: underline;
}
.sidenav a:active {
colour: #FF00F0;
text-decoration: underline;
}
.footer {
color: #CCC;
}
.footer a:link {
colour: #666;
text-decoration: none;
}
.footer a:visited {
colour: #333;
text-decoration: none;
}
.footer a:hover {
colour: #C1C1C1;
text-decoration: underline;
}
.footer a:active {
colour: #333;
text-decoration: underline;
}
Now you just need to apply the classes to each div and there you go!
No comments:
Post a Comment