Jump to content


Photo

CSS multiple color and style


  • Please log in to reply
1 reply to this topic

#1 wizzkid

wizzkid
  • Members
  • PipPipPip
  • Advanced Member
  • 39 posts

Posted 01 July 2006 - 10:01 AM

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

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
}

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 :)

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 01 July 2006 - 11:32 AM

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:
.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;
}





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users