Viewing Setting Text Properties

Setting Text Properties



User: Les C. 10 years ago
I created the following code, but for some reason the font is not showing up correctly—it's displaying as Times.

Also, am I formatting the sub-style of the font correctly?


Thanks,

L C

--------------------------------

<style>

a {
color: #333333;
}

a:hover {
color: #FF9900;
}

a:link {
text-decoration: none;
}

p {
font-family: "HelveticaNeue"; font-style: Thin;
}

</style>
User: Paul-RAGESW 10 years ago
This is because this will get over ridden by EverWeb's code.

Also there is no value of thin for font style.

I don't think you will be able to do what you want. You can try using the !important keyword but I have not tried it.

-------------------------------
Paul
EverWeb Developer
User: Les C. 10 years ago
--Paul

Thanks for your reply.

So how do I code a font family (say Helvetica) with a specific typeface (regular, medium, bold, medium-italic, etc.) if it's not font style?


L C
User: Paul-RAGESW 10 years ago
EverWeb does this for you. You don't need to do this.

If you're having trouble with something not working, please let me know.

Last edit 10 years ago

-------------------------------
Paul
EverWeb Developer
User: Roddy 10 years ago
You need to use two different CSS selectors - one for font style and the other for font weight.

Font styles are normal, italic and, the lesser used, oblique.

Font weight can be expressed as normal, bold, bolder, lighter or as a numbert such as 400, 600 etc.

<style type="text/css">
h1 {
font-family: helvetica, sans-serif;
font-size:20px;
font:weight:800;
font-style:italic;
}
</style>

I usually use the shoorthand version for fonts which is laid out like this...

font-style font-variant font-weight font-size/line-height font-family

Example

h1 {
font: italic small-caps bold 18px/20px helvetica, sans-serif;
}

-------------------------------
Roddy

Website: http://everwebwidgets.com
Contact: http://everwebwidgets.com/ewWidgets-home/contact.html
NOTE: I am an EverWeb user and NOT affiliated with EverWeb! Any opinions expressed in this forum are my own.
User: Les C. 10 years ago
--Paul

I'm using the EverWeb HTML snippet to create a hyperlink/anchor—not a simple text box element.

Consequently, there is not way for EverWeb to know which of the seventeen Helvetica family typefaces I want to use unless I specify it.

The question is "How?"


L C
User: Les C. 10 years ago
--Roddy

Font-weight isn't working for the typeface style.

Is there another option?


Thanks,

L C
User: Les C. 10 years ago
Guys, I just found the solution: Put a hyphen after the font family followed by the name of the typeface.

Thanks for helping me get the job done!


LC

Last edit 10 years ago
User: Les C. 10 years ago
Back again.

The "-" typeface name works in Safari, Chrome, and Opera—not in Firefox.

Any suggestions?


Thanks,

L C
User: Paul-RAGESW 10 years ago
Quote:
Guys, I just found the solution: Put a hyphen after the font family followed by the name of the typeface.


FYI That is the way to do it with Helvetica, but not all fonts will work like that. Most will though.

Quote:
The "-" typeface name works in Safari, Chrome, and Opera—not in Firefox.


Based on my research, this is a bug with Firefox currently and they will have to fix it.

-------------------------------
Paul
EverWeb Developer
✔ Best Answer  
User: Les C. 10 years ago
As a follow up, I got it to work in Firefox by coding it as font weight then putting the typeface name in quotes:

font weight: "Thin"

Didn't work without the quotes in Firefox. Strange.


L C


Post Reply
You must login or signup to post.