Need help on CSS link coding...

by 8 replies
9
Hello,

I am re-coding into this into a single line of code, but it doesn't work...

Here's the original old-type coding:

Code:
a.menu:link{
	        color: #3A88CC; 
	        font-size: 10pt;
	        text-decoration: none; 
	        font-weight: thinner; 
	        font-style: normal; 
	        font-family: arial;
	        }
Then I re-wrote like this:

Code:
a.menu:link{font: thinner normal 10pt "Arial"; text-decoration: none; color: #3A88CC;}
And it's not working.
The single line should work well. First is "style", second is "family"...
The problem is that "Arial" doesn't kick in... it appears Times New Roman (standard).

How do I write the single line command correctly so that it sees "Arial"?
(tried: arial/Arial/"Arial")
#website design #coding #css #link
  • In my books if it is a 'one-word' name it never needs quotes... Arial vs. "Times New Roman". Although arial works just as well.

    And I always add a generic font-type, just in case - arial, sans-serif;
  • It's not working, I've already tried the without quote marks... I put the quote marks, because it didn't work without...

    Did I get the order wrong?

    I wanted to make it simple, so I avoided the font-family, font-weight, font-style... I just wrote them in like that, one after another. It's supposed to be trendier.

    But I got something wrong.

    It worked before with the first setting (which I showed in the post first).
    • [1] reply
    • There are certain rules you have to follow if you use the font shorthand property...

      https://developer.mozilla.org/en-US/docs/CSS/font

      Personally though, I think that using CSS shorthand is more trouble than it's worth, as it makes your code harder to read whenever you need to make any changes to it.

      Also, I don't think "thinner" is a font-weight value (at least not a cross-browser one). Use "lighter" instead.
  • But what if I don't use CSS? I don't want to use a CMS on certain sites, so I'm stuck with CSS/HTML.

    According to multiple there is a "lighter" value, as there are "thick", "thicker" values...
    • [1] reply
    • You can't have it both ways. Which is it? :p

      That's what I just said!

      lol
      • [1] reply
  • Well, actually I'm more into marketing and first of all I code for myself. The coding work I do for others is minimal and I do have CSS/HTML knowledge, only that I'm very-very old-fashioned (pre-2005 style )... I do encounter a few problems and I'm glad to learn new stuff.

Next Topics on Trending Feed