...

View Full Version : Changing text font color within image/link



meanttolive
09-08-2011, 10:01 PM
Hello everyone,

I was wondering if it is possible to change the font color of text within a link or an image? i.e. If I have an image that says "Menu" and the text color is blue, how can I change it to red?

Thanks!

MrConman
09-09-2011, 01:28 AM
yes it is possible.


text-decoration:none; //This removes the underline on the text link
color:#000; //This makes the colour of the link black

meanttolive
09-09-2011, 02:22 AM
Thank you so much!

I have another question if you wouldn't mind helping me again.

I know that <strong> makes font bold, but is there a tag that has the opposite effect? i.e. If I need to make the text width "thinner".

Much appreciated :)

teedoff
09-09-2011, 02:49 AM
<strong> tags are deprecated which means styling should be done in CSS. You can set the font weight in your style sheet.

meanttolive
09-09-2011, 03:05 AM
Thanks for your help, teedoff.

From my understanding thus far, I can incorporate CSS into the HTML itself & I can access a separate page that already has the CSS. As I am using FileZilla, how should I go about setting the font weight? As in, where do I include it & what formatting does it involve (i.e. <span style="font-family:Arial"> uses the symbols "<",">", ":" etc to format it as code)?

I appreciate you taking the time to reply.

teedoff
09-09-2011, 03:34 AM
Embedded styles(in the head section) is fine. Of course external(linked) stylesheets are the best. Inline should be a last resort, as this is not separating content from style.


Yes you can wrap the text in span tags:

<span id=lightFont">Some text</span>

Then:

#lightFont {font-weight: lighter;} or a value from 100 to 900(100 being the lightest)

Apostropartheid
09-09-2011, 11:35 PM
<strong> tags are deprecated which means styling should be done in CSS. You can set the font weight in your style sheet.

No they aren't!

teedoff
09-10-2011, 12:13 AM
No they aren't!

lol My apologies. I thought since the strong tag was a way to "style" a piece of text, it was discouraged. And I thought I had read somewhere that it was included with other deprecated tags.

Sorry!!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum