News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

What is css code to the following please?

Started by winky100, July 31, 2010, 10:33:18 AM

Previous topic - Next topic

winky100

There is some code that looks like this

  <h1 class=forumtitle>
      <a href=blahblahblah>Title</a>
  </h>


I want to change the color of the text in the <a> tag using the .css file.

Can some please tell me the snippet of code to do this.
This code does not do it.
h1.forumtitle
{
line-height: 145px;
font-size: 1.8em;
font-family: Geneva, verdana, sans-serif;
margin: 0;
padding: 0;
float: left;
background-color: #ff0000;
color: #00ff00;
}

Masterd

#1
Try this:


/* Normal, standard links. */
a:link, a:visited
{
color: #346;
text-decoration: none;
}



winky100

I think i figured out how to do this.

I had to create a new block in the .css file like this

h1.fourmtitle a:visited
{
    color: #00ff00;
}


This code says that an achor element contained in a forumtitle class should have  green color.

Masterd

#3
It was my mistake. Try this:

/* the main title, always stay at 45 pixels in height! */
h1.forumtitle
{
   line-height: 45px;
   font-size: 2.2em;
   font-family: Tahoma, verdana, sans-serif;
   margin: 0;
   padding: 0;
   float: left;
   font-weight: 100;
}
h1.forumtitle a
{
   color: #fff;
}


Just change it to your own colour.

Advertisement: