Page 1 of 1

Assign Alternate Text and/or Title to HTML Extension Box

Posted: Wed Dec 16, 2020 2:15 pm
by LJLachance
On several pages I've used the html extension box inside a layout grid to display specific content.

IF, I add an image to a page, one can click on the properties of that image where you can enter the "alternate text" and "title" so that when the user overs over the image on the page, those items are displayed.

With the html extension, opening the object properties allows you to enter a "description" of the box but that is for local purposes only.

Is there a way to add (for the html extension) "alternate text" and "title" so that when the user hovers their mouse over the content of the extension on the live page they see the description or title? In a couple of cases, my html extension box actually uses a background image and I want to be able to add the "title" in a manner that displays the same as if it were just an image on the page.

Guidance appreciated

Re: Assign Alternate Text and/or Title to HTML Extension Box

Posted: Wed Dec 16, 2020 2:36 pm
by crispy68
As far as I know, you can't add Alt or Title tags to background images. The only thing you could do is add the Title attribute to the <div> the background image is contained in.

Re: Assign Alternate Text and/or Title to HTML Extension Box

Posted: Wed Dec 16, 2020 4:24 pm
by LJLachance
Thanks for that part - it's not so much the image, as in this particular case, I have a table in the html. I know I can title the table itself but that would show up in the table displayed... all I really want is when someone hovers on it, to have the "alt text" and "title" in a manner similar to what happens with an image... for instance, if someone hovers over the table (in the html block extension) it would say, for instance "Table of Names" or whatever.

What I have in the html now - (partially) <table class="MyTable">
<tbody>
<tr><td>&nbsp;</td></tr>
<tr>
<td> and etc... And, then in the page html (between the header tags) I reference the table using <style>
table.MyTable

Everything works as it is designed except finding the means to ID when hovering. Thanks for trying. It just occurred to me that this is a code question and maybe I shouldn't be asking here, my apologies, my mistake. Thanks

Re: Assign Alternate Text and/or Title to HTML Extension Box

Posted: Wed Dec 16, 2020 4:37 pm
by crispy68
Why can't you simply add the Title attribute to your code?

For the table:

Code: Select all

<table width="100" border="2" title="Henry Jacobs Camp summer 2003 schedule">
For a table element:

Code: Select all

<td title="They like bananas and sit in trees">monkees</td>

Re: Assign Alternate Text and/or Title to HTML Extension Box

Posted: Wed Dec 16, 2020 4:43 pm
by LJLachance
Crispy - sheer genius you are - that was the ticket, just had to find the right place to put it and it works like a charm. Thanks so much.