Alternate text on rollover of images not working???

13 replies
  • WEB DESIGN
  • |
I use dreamweaver 8 to design sites and when inserting images I always put alternate text in the available spot. I find when I load these sites to the net the alternate text does not display on rollover. Is there a simple solution. Please check one of my sites in signature
gamedaytradingcards.com to see example.

Thanks in advance

Peter
#alternate #images #rollover #text #working
  • Profile picture of the author webpeon
    you need to use the title attribute to have the text show on rollover

    use something like the following
    <img src="myimage.jpg" alt="my image alternate text" title="my image rollover text"/>
    Signature
    Web 2 Mobile
    The Future of The Web
    {{ DiscussionBoard.errors[5542456].message }}
    • Profile picture of the author Peter Thompson
      Originally Posted by webpeon View Post

      you need to use the title attribute to have the text show on rollover

      use something like the following
      <img src="myimage.jpg" alt="my image alternate text" title="my image rollover text"/>
      Thanks for that. Tried it and it worked. Was just wondering can dreamweaver automatically generate this. Is there some setting I can change. Going into every code to manually change this would be very time consuming.

      Peter
      Signature

      Peter Thompson
      supa2007
      http://www.pjtwebconcepts.com/
      Your home for building on the web

      {{ DiscussionBoard.errors[5543162].message }}
  • Profile picture of the author webpeon
    couldnt say to be honest, ive never used dreamweaver myself however to help you with your research youre probably looking for a "tooltip" option, thats the actual name for the textbox that shows up on hover
    Signature
    Web 2 Mobile
    The Future of The Web
    {{ DiscussionBoard.errors[5543556].message }}
    • Profile picture of the author Lovelogic
      Strictly speaking the site appears to be in need of a coding overhaul and the use of a database as this makes any further changes a tad simpler to implement.

      If your web hosting provider has PHP support then the script below may be useful, it's designed to read all the alt tags from the html pages and insert a duplicate title tag.

      PLEASE NOTE THIS HAS NOT BEEN TESTED regexing and replacing content can go horribly wrong so try it on a copy first.

      PHP Code:
      //path to directory to scan
      £directory "yoursite.com";
       
      //get all  files with a .html extension.
      £pages glob(£directory "*.html");
       
      //loop each file name
      foreach(£pages as Â£page)
      {
      // read the html file into memory
      £fh fopen(£page'r');
      £html fread(£fhfilesize(£page));
      fclose(£fh);


      preg_match_all("/alt="(.+?)"/"£html£matches,

      foreach (
      £matches as Â£val);
      £i=0;
      while (
      £val[£i]){
      preg_replace('/alt="/''title="'.£val[£i].'" alt="'£html);
      £i++;
      }

      £fh fopen(£page'w') or die("can't open file");
      fwrite(£fh£html);
      fclose(£fh); 
      Had to use the £ symbol as $ is not allowed for some insane reason
      {{ DiscussionBoard.errors[5544765].message }}
  • Profile picture of the author Peter Thompson
    What do you mean by a coding overhaul
    Signature

    Peter Thompson
    supa2007
    http://www.pjtwebconcepts.com/
    Your home for building on the web

    {{ DiscussionBoard.errors[5549287].message }}
  • Profile picture of the author nightshade877
    Banned
    Did you get this solved? Would love to hear the solution (or help solve it myself)
    {{ DiscussionBoard.errors[5575538].message }}
  • Profile picture of the author webpeon
    what youre probably looking for is some sort of dreamweaver extension that prompts you for a title tag when an image is selected, i took a quick look on google and this is the first page that seemed even remotely like what you are needing to do, dont quote me on this though, as above ive never used dreamweaver...
    http://www.haroldbakker.com/extensions/imagetitle.php


    also the poster aboves comment about needing a coding overhaul, im guessing what he meant is youre pages are very hard to maintain and understand from a coding perspective, the first thing i noticed is your css file doesnt contain names that are easily identifiable, ie i saw a big long list of .style etc etc, the page source is quite messy as well, not sure if i can be more help, its really hard for me to elaborate on it without redisging the wheel for you
    Signature
    Web 2 Mobile
    The Future of The Web
    {{ DiscussionBoard.errors[5584779].message }}
    • Profile picture of the author Peter Thompson
      Originally Posted by webpeon View Post

      what youre probably looking for is some sort of dreamweaver extension that prompts you for a title tag when an image is selected, i took a quick look on google and this is the first page that seemed even remotely like what you are needing to do, dont quote me on this though, as above ive never used dreamweaver...
      Harold's Home | Extensions : Set Image title


      also the poster aboves comment about needing a coding overhaul, im guessing what he meant is youre pages are very hard to maintain and understand from a coding perspective, the first thing i noticed is your css file doesnt contain names that are easily identifiable, ie i saw a big long list of .style etc etc, the page source is quite messy as well, not sure if i can be more help, its really hard for me to elaborate on it without redisging the wheel for you
      Understand what you are saying these sites have been built through a period when I was learning dreamweaver. What effect does this coding have if any on the performance of my site. ie for viewing by visitors and getting listed in searches. I already have high listing for one of those sites in google for relevant searches.
      Signature

      Peter Thompson
      supa2007
      http://www.pjtwebconcepts.com/
      Your home for building on the web

      {{ DiscussionBoard.errors[5629677].message }}
  • You need to edit the HTML in Dreamweaver and add the alt="" tag yourself.
    Signature

    Chameleon Web Services Limited

    {{ DiscussionBoard.errors[5585390].message }}
  • Profile picture of the author webpeon
    they say less coding, or cleaner coding improves your SEO ranking but im yet to see proof of this... it does effect loading speed sometimes if the code isnt efficient but with smaller sites its not such a big thing to worry about.

    mostly its just a maintenance thing for developers, you tend to run into less issues with cleaner code and are able to debug alot quicker, additionally if you decide to let someone else drop an add-on of some sorts into the site it'll be alot more stress free for them
    Signature
    Web 2 Mobile
    The Future of The Web
    {{ DiscussionBoard.errors[5630051].message }}
  • Profile picture of the author Peter Thompson
    If I decided to sell a site would coding issues be a turn off even if the iste is making money ???
    Signature

    Peter Thompson
    supa2007
    http://www.pjtwebconcepts.com/
    Your home for building on the web

    {{ DiscussionBoard.errors[5630283].message }}
  • Profile picture of the author webpeon
    would be for me, cant speak for others, some people dont mind just buying into the idea of a site and redecorating it,
    Signature
    Web 2 Mobile
    The Future of The Web
    {{ DiscussionBoard.errors[5631358].message }}

Trending Topics