0

If I have something like the code below I would expect my link to be in red color with large fonts, it does not work, however.

.footer {
  text-align: center;
}

.footer a {
  color: red;
  font-size: 32px;
}

Live example: http://jsfiddle.net/avUT4/

I don't understand. I'm not good at css but why this code does not work?

4 Answers 4

3

There is some strange character in front of the .footer a rule. Try copying the code to jsbin.com and you'll see it marked by a red dot. This happens to me a lot when copying from jsfiddle. If the char is removed, all is good.

Here is your fiddle, without that character.

Sign up to request clarification or add additional context in comments.

3 Comments

I'd rather say, it's a jsfiddle problem. Happens all the time if you copy from jsfiddle.
It's called a Byte Order Mark (Here it is when it's URL Encoded: %EF%BB%BF)
@Yoshi no man, it's Web Essentials 2012 for visual studio. It compiles LESS code to CSS and I wondered what is wrong with it since it looks correct but it's not.
1

As far as I can tell you have a garbage character somewhere. I rewrote it and it's fine.

.footer
{
 text-align:center;   
}

.footer a
{
 color:red;
 font-size:32px;    
}

http://jsfiddle.net/avUT4/10/

1 Comment

Yeah, I think that's what I discovered through a different route.
0

I think this is a bug in jsfiddle. If you just define:

a {
  color: red;
  font-size: 32px;
}

It works. Then if you add .footer (just type it back in before "a"), it works still, but it won't work from the start point when ".footer a" is defined.

Comments

0

try this:

.footer {
  text-align: center;
}

.footer a:link, a:active {
  color: red;
  font-size: 120px;
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.