Jump to content

Changing Color of "only 1" link in page


debsten

Recommended Posts

Hi,

 

I am trying to work with a link in a page on a site where I want to override the css on only 1 link within the page. I created a new css rule and put it in, problem is I can't get the font color to change on the link, if I put a background color in the rule it will change that but not the text color.

 

Here is the code on the page, the part in red is the where I am having problems. I want the "Red Hot Offer" line to always stay red. But can't get it to work. I know I must be missing something simple but can't seem to find what.

 

Any help would be much appreciated.

 

Thanks

Debbie

 

Nightly

1

Bedroom Townhouse

$416pn

$228pn

$208pn

canterbury-rates.jpg RED HOT OFFER: STAY A MINIMUM OF 7 NIGHTS & RECEIVE TWO FREE GOLD CLASS MOVIE TICKETS

 

This is the css

 

/*General*/

body {
 margin: 10px;
 padding: 0px;
 font-family: verdana, arial, sans-serif;
 font-size: 13px;
 background-color: #D6C3B6;
 text-align: justify;
}
h1 {
   font-size: 1em;
   margin-bottom: 0px;
   padding-bottom: 0px;
}
h2 {
   text-transform: uppercase;
   background-color: #957171;
   color: #ffffff;
   font-size: 1em;
   font-weight: normal;
   padding: 6px;
   margin-bottom: 0px;
   text-align: left;
}
h3 {
   text-transform: uppercase;
   background-color: #957171;
   color: #ffffff;
   font-size: 1em;
   font-weight: normal;
   padding: 6px;
   margin-bottom: 0px;
}
h4 {font-size: 1em; margin-bottom: 0px;}
h5 {font-size: 0.9em;font-weight: normal;margin-bottom: 0px;}

table {font-size: 1em;}
td {vertical-align: top;}
th {background-color: #B4937A; color: white; text-align: left; vertical-align: top;}
li {padding: 2px 0px;}
em {font-style: normal;}
a.button {     
   display: block;
   padding: 1px 0px;
   width: 100px;border-top: 1px solid #9E9E9E;
   border-left: 1px solid #9E9E9E;
   border-right: 1px solid black;
   border-bottom: 1px solid black;
   text-decoration: none;
   color: black;
   text-align: center;
   font-size: 0.8em;
   background-color: #E3E5E3;
}
a:hover.button {
   border-top: 1px solid black;
   border-left: 1px solid black;
   border-right: 1px solid #9E9E9E;
   border-bottom: 1px solid #9E9E9E;
}
#wrapper {
   position:relative;
   margin-left:auto;
   margin-right:auto;
   width: 982px;
   padding-top: 20px;
   background-color: #673333;
   text-align: justify;
}
.k {margin-right: 0.2em;}

/*Navigation*/

#MDME {
   position: absolute;
   width: 256px;
   /*float: left;*/
   left: 0px;
   top: 20px;
}
#MDME img {
   position: relative;
   bottom: 0px;
}
#contact {
   position: relative;
   bottom: 165px;
   right: 17px;
   color: white;
   text-align: right;
   z-index: 2;
   display: none;
}
#contact a {
   color: 673333;
   text-decoration: none;
}
#contact a:hover {
   text-decoration: underline;
}
#subscribe {
   position: relative;
   bottom: 195px;
   left: 28px;
   width: 228px;
   background-color: #8D5932;
}
#subscribetext {
   font-size: 0.85em;
   color: #ffffff;
   padding: 6px;
   text-align: left;
}
#subscribetext img {
   float: right;
   margin-right: 4px;
   margin-top: 10px;
}
#subscribetext a {color: white;}
#subscribetext a:hover {text-decoration: none;}

#nav {        
   /*width: 228px;*/
   background-color: #8C5933;
   margin-left: 28px;
   /*margin-top: 20px;*/
   padding-top: 15px;
   text-align: center;
   font-size: 0.85em;
}
#nav ul {
/*    width: 215px;  */
   width: 215px;
   list-style-type: none;
   margin: 0px 0px 0px 7px;
   padding: 0px;    
}
* html #nav ul {
   margin-left: 0px;
   /*w\idth: 750px; Explorer 6 */
   /* NOTE: If Explorer 6 is in Quirks mode it will act like 5!!! */
}
#nav ul li {
   border-left: 1px solid #8C5933;
   border-right: 1px solid #8C5933;
   border-top: 1px solid #A98059;
   border-bottom: 1px solid #A98059;
   width: auto;
   padding: 0px;    
   letter-spacing: 0.15em;
}
#nav ul li.bottom {border-bottom: 2px solid #A98059;}
#nav ul li.top {border-top: 2px solid #A98059;}

#nav ul li ul {
   background-color: #B4937A;
   margin: 0px;
   padding: 0px;    
   width: auto;
   display: none;
}

#nav ul li ul#open {display: block;}

#nav ul li ul li {
   letter-spacing: 0.1em;
   font-size: 0.9em;
}
#nav ul li a {
   color: white;
   text-decoration: none;
   padding: 5px;
   display: block;
}
#nav a:hover {background-color: #906D4C;}

/*Shared Main Text Area*/

#maintextarea {
   margin: 0px 20px 20px 256px;
   background-color: #ffffff;
   padding: 10px;
   border-top-width: 15px;
   border-right-width: 15px;
   border-bottom-width: 15px;
   border-left-width: 15px;
   border-top-style: solid;
   border-right-style: solid;
   border-bottom-style: solid;
   border-left-style: solid;
   border-top-color: #957171;
   border-right-color: #957171;
   border-bottom-color: #957171;
   border-left-color: #957171;
}
#maintextwidth{
   width: 649px;
}
#maintextarea a {
   color: #673333;
}
#maintextarea a:hover {
   color: #957171;
}
#no-nav-box {
   background-color: #ffffff;
   border: 15px solid #957171;
   padding: 10px;
   margin-left: auto;
   margin-right: auto;
}
#no-nav-box a {color: #673333;}
#no-nav-box a:hover {
   color: #957171;
}

/*Index Main Text Area*/

.darkblue {
   background-color: #465F64;
   color: #ffffff;
   padding: 6px;
   text-align: center;
   width: 529px;
   vertical-align: middle;
}
.darkblue h2 {
   font-size: 13px;
   letter-spacing: 0.1em;
   margin: 0px;
   padding: 0px;
   background: none;
   font-weight: bold;
}

.brown {
   background-color: #8C5933;
   color: #ffffff;
   padding: 0px;
   margin:0px;
   width: 116px;
   text-align: center;
}

#blue {
   background-color: #82c8ef;
}
#banner {margin-top: 29px;}
#blue-bottom {margin-left: 344px;}

#brown {
   background-color: #B4937A;
   color: #ffffff;
   background-image: url("images/brown-bg.gif");
   background-position: bottom right;
   background-repeat: no-repeat;
   padding: 10px;
   text-align:justify;
}
#locations {/*background-color: #D6C3B6;*/
   color: #673333/*#585654*/;
}
#locations img {margin: 5px 0px 0px 5px; border: 1px solid white;}
.description {font-size: 0.8em;padding: 5px; text-align:justify;}
.description a {text-align:left;}

/*Internal Main Text Area*/

#int-banner {
   height: 131px;
   background-image: url('images/int-banner.jpg');
   background-repeat: x-repeat;
   background-position: top right;
}

#heading {background-color: #B4937A;color: #ffffff;padding: 7px 7px 7px 10px;}
#heading h1 {color: #ffffff;text-transform: uppercase;font-size: 13px;font-weight: bold; padding: 0px; margin: 0px;}
.large {font-size: 1.5em;font-family: arial, verdana, san serif;font-weight: normal;letter-spacing: 0.1em;}
#heading h1 span.large {font-size: 1.4em;}
#heading h2 {color: #ffffff;font-size: 1em; text-transform: none; background: none; padding: 0px;}
/*#heading td {vertical-align: middle;}*/
#heading img {float: right; border: 10px solid white;}
#heading img#starrating {border: none; float: none;}
#heading img#branding {border: none; float: none; width: 100%;}
#subnav {background-color: #82C8EF;color: #ffffff;padding: 4px 7px;}
#subnav ul {margin: 0px; padding: 0px;}

#subnav li {
   float: left;
   border: 1px solid #ffffff;
   margin-right: 5px;
   list-style: none;
   padding: 0px;
}
#subnav li.active {background-color: #957171;}
#subnav a {color: white;text-decoration: none;padding: 0px 27px;}
#subnav a:hover {color: white; background-color: #957171;}

#images {text-transform: uppercase;text-align: center; float: left;font-size:.7em;}
#maintext {padding-top: 3px; font-size: 1em; text-align: justify;}
.maintext {padding: 5px;}
.tariffs {/*border: 2px solid #B4937A;*/background-color: #B4937A; width: 100%;}
.tariffs td {/*background-color: #B4937A; color: white;*/ background-color: white; padding: 2px;}


#sitemap ul {margin-left: 20px;padding-left: 0px;}
#sitemap dd {margin-left: 7px; padding-left: 0px; font-size: 0.9em;}
#sitemap a {text-decoration: none;}
#sitemap h3 {background: none; padding-bottom: 0px;}


/*Footers*/

#footer {
   text-align: center;
   color: #673333;
   font-size: 0.8em;
   padding: 5px 0px;
   width: 700px;
   margin-left: 256px;
}
#footer-no-nav {
   text-align: center;
   color: #673333;
   font-size: 0.8em;
   padding: 5px 0px;
   width: 725px;
}
#footer a, #footer-no-nav a {color: black; text-decoration: none;}
#footer a:hover, #footer-no-nav a:hover {text-decoration: underline;}

/*Various Classes*/

.small {
   font-size: 0.8em;
   text-transform: none;
}
.center {
 text-align:center;
}
#navleftlink a, a.navleftlink {
   color: white;
   font-size: 0.8em;
   text-decoration: none;
   display: none;
}
#reservation h1 {
   font-family: arial, verdana, san serif;
   font-weight: normal;
   letter-spacing: 0.1em;
   font-size: 1.6em;}

.red {color: #ff0000;}
.rightimage {margin-left: 10px; margin-bottom: 10px;}
#property-of-the-month img {
   margin-right: 10px; 
   margin-bottom: 10px; 
   float: left;
}
#specialLink {
   color: #FF0000;
   font-family: Verdana, Arial, Helvetica, sans-serif;
   background-color: #FF0000;
}

Link to comment
Share on other sites

At the moment you have the font color the same as the background-color so the text will not be readable.

 

Do you want it a different color all the time or just on the normal link state, with the hover and visited states the same as before?

 

You have added an id into the markup:-

RED HOT OFFER: STAY A MINIMUM OF 7 NIGHTS & RECEIVE TWO FREE GOLD CLASS MOVIE TICKETS

 

and CSS

#specialLink {

color: #FF0000;

font-family: Verdana, Arial, Helvetica, sans-serif;

background-color: #FF0000;

}

 

which did work in my test with only a little of your code but it may also need the id of the containing div if there is one, like:-

 

#nav #specialLink {

color: #FF0000;

font-family: Verdana, Arial, Helvetica, sans-serif;

background-color: #FF0000;

}

(Note space between #nav and #specialLink)

 

and/or it may need to be on the "a" link states like:-

 

#nav a#specialLink {

color: #FF0000;

font-family: Verdana, Arial, Helvetica, sans-serif;

background-color: #FF0000;

}

(Note no space between a and #specialLink)

 

I can't be sure without all your code to test. As a last resort, put in a span tag:-

 

RED HOT OFFER: STAY A MINIMUM OF 7 NIGHTS & RECEIVE TWO FREE GOLD CLASS MOVIE TICKETS

with this style:-

.red { color: red; }

Edited by Wickham
Link to comment
Share on other sites

Wickham,

 

Thank you so much, I ended up doing the span class, I had tried some of the other things you mentioned but no luck. The background was only the same as a test, I was just seing if anything was working, when I viewed it the red background came up but it still had a different color font even though I had it set for red.

 

Doing the span tag worked, still has underline for some reason, but this is something that only needs to be on the page for a month or so, so will leave it as that instead of trying to figure out what I am missing.

 

Thanks again for the fast response and your help, greatly appreciate it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...