• I am putting links in a text widget and want them to be different with a, a:hover than the stylesheet defines. Can I wrap the text with a <div style=> tag and define the link properties in the widget? Is so how would I define it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • How are you putting the links in to the text widget?

    — The easiest thing would be to give the links themselves a unique css class directly. OR better still use the existing classes to access the required links…

    The default code for a sidebar and text-widget look like this:

    <div id="primary" class="widget-area" role="complementary">
      <ul class="xoxo">
        <li id="text-3" class="widget-container widget_text">
          <h3 class="widget-title">TEST</h3>
          <div class="textwidget">
            <p>an arbitrary test text widget!</p>
          </div>
        </li>
      </ul>
    </div>

    …so if you want to reference the links contained only within the text-widget then it’s as simple as:

    .textwidget a {/* css rules here */}
    .textwidget a:hover {/* hover styles */}

    hth

    Thread Starter hyfyve

    (@hyfyve)

    Thanks Grizz, I defined in css and set the class, works good.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Defining link hover properties in single text widget’ is closed to new replies.