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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.