Web Analytics Made Easy -
StatCounter Changing text font color within image/link - CodingForum

Announcement

Collapse
No announcement yet.

Changing text font color within image/link

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      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

      Comment


      • #4
        <strong> tags are deprecated which means styling should be done in CSS. You can set the font weight in your style sheet.
        Teed

        Comment


        • #5
          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.

          Comment


          • #6
            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

            Comment


            • #7
              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!
              Blog | Twitter
              Useful links: W3C HTML Validator | W3C CSS Validator | HTML 5 Guide
              CF: HTML & CSS Resources/Tutorials Thread | HTML & CSS Posting Rules and Guidelines
              Remember: no link, no code, no help!

              Comment


              • #8
                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

                Comment

                Working...
                X
                😀
                🥰
                🤢
                😎
                😡
                👍
                👎