• 0

link colour in one Cass only


Question

Hi,

How would i go about having the "links" in my Class ".content_text" be "#CCC", but all other links just to be just the default blue? what would the code be in the section?

@charset "utf-8";
body {
	background-color: #000;
	text-align: center;
}
html, body {
	margin: 0px;
	padding: 0px;
}

#wrapper {
	width: 1024px;
	height: 768px;
	position: relative;
	margin-top: 25px;
	margin-right: auto;
	margin-bottom: 0px;
	margin-left: auto;
	text-align: left;
	background-image: url(../images/wrapper_bckg.jpg);
	background-repeat: no-repeat;
}
#header {
	height: 150px;
	width: 1024px;
}
#header_strip {
	clear: right;
	float: right;
	height: 2px;
	width: 764px;
	margin-top: 10px;
	margin-bottom: 10px;
}
#lensart_logo {
	float: left;
	height: 150px;
	width: 260px;
	margin-top: 0px;
}
#navbutton1 {
	float: right;
	height: 46px;
	width: 48px;
	margin-top: 52px;
}
#navbutton2 {
	float: right;
	height: 46px;
	width: 77px;
	margin-top: 52px;
}
#navbutton3 {
	float: right;
	height: 46px;
	width: 71px;
	margin-top: 52px;
}
#navbutton4 {
	float: right;
	height: 46px;
	width: 66px;
	margin-top: 52px;
}
#navbutton5 {
	float: right;
	height: 46px;
	width: 64px;
	margin-top: 52px;
}
#navbutton5_text {
	float: right;
	height: 10px;
	width: 326px;
	margin-top: 0px;
	clear: right;
}
#maincontent {
	height: 335px;
	width: 655px;
	margin-right: auto;
	margin-left: auto;
	background-image: url(../images/mainContent_bkg.jpg);
	background-repeat: no-repeat;
	margin-top: 50px;
	margin-bottom: 100px;
}
#maincontent_frost {
	height: 175px;
	width: 655px;
	background-image: url(../images/maincontent_frost_r2_c2_s1.png);
	background-repeat: repeat;
	margin-top: 160px;
	margin-right: 0px;
	margin-bottom: 0px;
	margin-left: 0px;
	float: left;
}
#footer {
	height: 200px;
	width: 1024px;
	position: absolute;
	bottom: 0px;
}
.content_text {
	font-family: Tahoma, Geneva, sans-serif;
	font-size: 12px;
	color: #CCC;
	margin-top: 10px;
	margin-right: 20px;
	margin-bottom: 10px;
	margin-left: 20px;
	text-align: left;
}
.content_text_h1 {
	font-family: Tahoma, Geneva, sans-serif;
	font-size: 14px;
	color: #ccc;
	margin-top: 10px;
	margin-right: 20px;
	margin-bottom: 10px;
	margin-left: 20px;
	font-style: normal;
	font-weight: bold;
}
.navabar_text_h1 {
	font-family: Tahoma, Geneva, sans-serif;
	font-size: 9px;
	color: #ccc;
	margin: 0px;
	text-align: center;
}
.footer_textCopy_h2 {
	font-family: Tahoma, Geneva, sans-serif;
	font-size: 11px;
	color: #666;
	margin-top: 10px;
	text-align: center;
	margin-bottom: 0px;
	margin-right: 0px;
	margin-left: 0px;
}
.footer_textCopy_h3 {
	font-family: Tahoma, Geneva, sans-serif;
	font-size: 9px;
	color: #666;
	margin-top: 10px;
	text-align: center;
	margin-right: 0px;
	margin-bottom: 0px;
	margin-left: 0px;
}

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

iirc its something like this:

a.content_text {
        font-family: Tahoma, Geneva, sans-serif;
        font-size: 12px;
        color: #CCC;
}

I could be wrong though :p

Link to comment
Share on other sites

  • 0

That would surely colour all text in that class. its only the links i want to define. Hmmm i wonder if i need to define new classs for links!

Link to comment
Share on other sites

  • 0

You could do:

  a {
   link: blue;
 }

That will default all links to the color blue.

Then:

  .content_text a {
         color: #CCC;
 }

That will style all links under the class "content_text" as the grey.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.