• Resolved broadleon

    (@broadleon)


    Hi

    When you hover a mouse over a picture most of the time if done right you get alternative text name appear ( the alt=”” in the href )

    But what about text? i have a shorten text command below because of the style of my site HERE.
    Can i have the same ( alt=”” from the picture ) or the full title when the mouse hovers over the text?

    <h4 class="title"><a>"><?php the_title_shorten(35,'...'); ?></a></h4>

Viewing 8 replies - 1 through 8 (of 8 total)
  • most of the time if done right you get alternative text name appear ( the alt=”” in the href )

    Sorry but that’s not the case. IE does it “wrong” by displaying the alt text onhover. Other browsers correctly show the title attribute.

    And your code above is completely mangled.

    Thread Starter broadleon

    (@broadleon)

    And your code above is completely mangled.

    Why?

    There’s no href for the a tag!

    Thread Starter broadleon

    (@broadleon)

    <h4 class=”title”> href=”< ?php the_permalink(); ?>”> <?php the_title_shorten(35,’…’); ?></h4>

    sorry the code on the post editor removed some text

    Try using the code button…

    Thread Starter broadleon

    (@broadleon)

    Ive removed the <a href=”<?php the_

    Code button not workin

    <h4 class=”title”>< href=”< ?php the_permalink(); ?>”> <?php the_title_shorten(35,’…’); ?></></h4>

    The code button works just fine. Try something like:

    <h4 class="title"><a href="<?php the_permalink();?>" title="<?php the_title_attribute( array('before' => '', 'after' => '')); ?>"><?php the_title_shorten(35,'...'); ?></a></h4>

    Thread Starter broadleon

    (@broadleon)

    Thanks for the help esmi.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Alt text for text!’ is closed to new replies.