Reply to Re: Making a <div display the equivalent of <img's alt=

Your name:

Reply:


Posted by Mark Simon on 12/18/05 03:42

Could you give an example of what you thing the img syntax would look
like? And can you give a more complete example of what the coding would
look like?

You shouldn't use the alt attribute of an image this way. Although IE
will display the contents this way (Mozilla does not), the real purpose
for the alt text is as a substute for the image if, for some reason, it
cannot be shown. If you use the title attribute, all browsers will
render it the way you intended, and you will be making better use of the
attributes.

This doesn't solve your div problem. If your html is properly marked up
(as in xhtml), you could use xslt to extract any attribute information
you like.

Regards,

Mark



Curtis wrote:
> We're in the final stages of writing a markup language. We
> included a macro feature, which also turned out to be a
> handy way to style elements like paragraphs and such.
>
> In the PHP code we have a <p ... style=\"==para==\"
>
> If we wish to style a particular paragraph, we just define a
> macro:
>
> .==para==width: 50%; padding: 10px; color: navy;
>
> and so forth. It applies to all paragraphs until we clear
> it:
>
> .==para==
>
> whereupon the subsequent paragraphs are styled by the
> default CSS file. This is for advanced users, and CSS syntax
> is about as clean as they come, so why not?
>
> So here's the problem: today we're finishing the code for
> links, images, etc. Images are a big deal for this
> application, and **one vital feature is the mouseover ALT
> text.**
>
> We have it in the <IMG ... ALT="Witty description" of
> course.
>
> If we embed a macro into here, though, like <IMG ...
> ALT="Witty description" ==img== we're forced to use a syntax
> different from CSS, equals symbols instead of colons, for
> example.
>
> This mixed syntax is undersirable from a user perspective.
>
> We can display an image in a <div, which would permit us to
> use CSS syntax to manipulate, but is there any
> non-Javascript way to get a mouseover ALT message?
>
> If not, or if displaying images with <div and CSS is
> cross-browser flakey upon closer scrutiny, we're prepared to
> just translate CSS-style text for the image into the HTML
> <img syntax and go with the <img tag.
>
> Feedback and suggestions most definitely appreciated.
>
> --
>
> Curtis
>
> Visit We the Thinking
> www.wethethinking.com
> An online magazine/forum
> devoted to philosophical
> thought.
>
>


--
<hr />
<p><strong>Mark Simon</strong><br />
Comparity Net<br />
Computer Training &amp; Support</p>
<p>Phone/Fax: 1300 726 000<br />
mobile: 0411 246 672</p>
<p>email: <a href="mailto:mark@comparity.net">mark@comparity.net</a><br />
web: <a href="http://www.comparity.net">http://www.comparity.net</a></p>
<p>Resume: <a href="http://mark.manngo.net">mark.manngo.net</a><br />
Calendar: <a
href="http://www.comparity.net/calendar.php">http://www.comparity.net/calendar.php</a></p>

<br>
<hr />

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация