Jump to content

CSS multiple color and style


wizzkid

Recommended Posts

Hi Guys,

I am currently learning how to use css, on index.hml I add <LINK href="<style.css" type=text/css rel=stylesheet> 

the content of my style.css is

[code]A:link {
FONT-SIZE: 9px; COLOR: #303030; FONT-FAMILY: Arial; TEXT-DECORATION: none
}
A:visited {
FONT-SIZE: 9px; COLOR: #303030; FONT-FAMILY: Arial; TEXT-DECORATION: none
}
A:hover {
FONT-SIZE: 9px; COLOR: #303030; FONT-FAMILY: Arial; TEXT-DECORATION: underline
}[/code]

It worked well. however, I want to have a multiple link style and color, in index.html i want to create 1. news box, 2. announcement box 3. my menu. on 1.news box, i wanted to make it blue when I hovered the link, 2. announcement, i would like to make it red when hovered.  etc. I believe it can be done using <div> but I dont know how. Can somebody tell me how to do it? :)

Also, how to use <fieldset></fieldset>? :)

Thanks a lot :)
Link to comment
https://forums.phpfreaks.com/topic/13372-css-multiple-color-and-style/
Share on other sites

Simple use the class/id name of your news, announcement and menu boxes before the link style. So for your news box do something like so:
[code].news a:link, .news a:active, .news a:visited {
    FONT-SIZE: 9px; COLOR: #303030; FONT-FAMILY: Arial; TEXT-DECORATION: none;
}
.news a:hover {
    FONT-SIZE: 9px; COLOR: #303030; FONT-FAMILY: Arial; TEXT-DECORATION: underline;
}[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.