WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Eleven
[resolved] How do I prevent a mailto link in text widget from being bold/boldfaced? (10 posts)

  1. mluther
    Member
    Posted 1 year ago #

    Hello,
    Using the TwentyEleven theme, I have added a text widget to the sidebar. In the body of the text widget, I added a mailto link.

    After I saved the widget, I viewed our website and was surprised to see that the email address / mailto link was in bold. I don't want it to be in bold. How can I prevent mailto links or any other links (href, etc.) from appearing in bold, when they are in text widgets?

    http://wordpress.org/extend/themes/twentyeleven/

    Update/PS: I am using a child theme.

  2. Andrew Nevins
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 1 year ago #

    When modifying themes not custom built, use a Child Theme.

  3. mluther
    Member
    Posted 1 year ago #

    Andrew, I do use a child theme. What changes must I make to my child theme to unbold the mailto link?

  4. Andrew Nevins
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 1 year ago #

    It sounds like you need to create a CSS style of font-weight: normal.

  5. ClaytonJames
    Member
    Posted 1 year ago #

    @mluther

    You can usually add an inline style directly to the text widget if you like. Or, if there is going to be a lot of links in text widgets, you can create a class(s) for it and define it in your style sheet. Seems like either way should work just fine.

  6. mluther
    Member
    Posted 1 year ago #

    Thanks, Andrew, for your reply.

    Using firebug in Firefox, I see that everything in the sidebar is in <div id="secondary"> (main posts/pages are in <div id="primary">, and both primary and secondary comprise <div id="main">.

    The text widget is in <aside id="text-2" class="widget widget_text">, and the body of the text widget is inside <div class="textwidget">.

    I have taken note of your instruction to " create a CSS style of font-weight: normal." But what exactly will be getting that font-weight of normal? The entire <div class="textwidget">? I think that will mean that everything without exception inside the textwidget will be normal (not bolded). But what if I add a <b> code in the text widget?

    Thanks for helping a newbie.

  7. mluther
    Member
    Posted 1 year ago #

    Thanks for chiming in, Clayton. I don't plan on adding a lot of links in text widgets, so maybe your advice of adding an "inline style directly to the text widget" would be easier.

    What is the html code for adding inline style of "non-bold" or "font-weight:normal"?

    Thanks for your help.

  8. ClaytonJames
    Member
    Posted 1 year ago #

    An example of an inline style on the mailto link in a text widget:

    <a style="font-weight: normal;"  href="mailto:anybody@somewhere.com">
    Contact me by Email</a>
  9. mluther
    Member
    Posted 1 year ago #

    Thanks, Clayton. That was the solution.

  10. ClaytonJames
    Member
    Posted 1 year ago #

    You're welcome.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic