Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Smile Changing text font color within image/link

    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!

  • #2
    New Coder
    Join Date
    Aug 2011
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yes it is possible.

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

  • #3
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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

  • #4
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    <strong> tags are deprecated which means styling should be done in CSS. You can set the font weight in your style sheet.
    Teed

  • #5
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Smile

    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.

  • #6
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    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)
    Teed

  • Users who have thanked teedoff for this post:

    meanttolive (09-09-2011)

  • #7
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Quote Originally Posted by teedoff View Post
    <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!

  • #8
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Quote Originally Posted by Apostropartheid View Post
    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!!
    Teed


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •