Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Dynamic caption NOT showing on PC but does on MAC

LEGEND ,
Feb 14, 2008 Feb 14, 2008
Hi All,

I'm confused about why my caption is not showing up on the PC side in
either IE or Firefox, but it does show up on the MAC side in Firefox,
Safari and Opera.


> <?php do { ?>
> <div id="imgcont"><img src="images/product_imgs/thmb/<?php
> echo $row_chooseProducts['image']; ?>"
> alt= <?php echo $row_chooseProducts['mod_num']; ?> /><br />
> <p class="imgcapt"><?php echo
> $row_chooseProducts['mod_num']; ?> </p>
> </div>
> <?php } while ($row_chooseProducts =
> mysql_fetch_assoc($chooseProducts)); ?>


As you can see above, I have a div containing an image and a caption,
both drawn from the same table. The entire div "imgcont" is a repeating
region. On the MAC the caption shows perfectly below the image in all
browsers, on the PC I just get a little line like a hyphen below the
image. Why is this happening on the PC?

TIA

Brett
TOPICS
Server side applications
422
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 14, 2008 Feb 14, 2008
Brett wrote:
> Hi All,
>
> I'm confused about why my caption is not showing up on the PC side in
> either IE or Firefox, but it does show up on the MAC side in Firefox,
> Safari and Opera.
>
>
>> <?php do { ?>
>> <div id="imgcont"><img src="images/product_imgs/thmb/<?php
>> echo $row_chooseProducts['image']; ?>"
>> alt= <?php echo $row_chooseProducts['mod_num']; ?> /><br />
>> <p class="imgcapt"><?php echo
>> $row_chooseProducts['mod_num']; ?> </p>
>> </div>
>> <?php } while ($row_chooseProducts =
>> mysql_fetch_assoc($chooseProducts)); ?>
>
>
> As you can see above, I have a div containing an image and a caption,
> both drawn from the same table. The entire div "imgcont" is a repeating
> region. On the MAC the caption shows perfectly below the image in all
> browsers, on the PC I just get a little line like a hyphen below the
> image. Why is this happening on the PC?

Use the title tag instead of alt. Alt is only supposed to used by screen
readers, some browsers got it wrong.

Steve
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 14, 2008 Feb 14, 2008
Hi Steve,

>
> Use the title tag instead of alt.

I'm not sure I understand. My post showed an excerpt from my page and
it already has a title. Only one title per page as I understand it.
The alt= is for accessibility as you say for screen readers, but my
caption has a <p> paragraph tag. How would the title affect the <p> tag?

Brett

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 14, 2008 Feb 14, 2008
I should also note that in source view the <p> is visible.

> <div id="imgcont"><img src="images/product_imgs/thmb/AB001.gif" alt= AB001 /><br />
> <p class="imgcapt">AB001 </p>
> </div>

So if the code is correctly generated, as seen in the source, then why
is it not showing on the page?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 14, 2008 Feb 14, 2008
Even more interesting is that I can highlight the little hyphen
character > copy > paste in notepad and it is the correct text. Wow,
what's that about?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 14, 2008 Feb 14, 2008
Never mind, I figured it out. I had this in my stylesheet font-size= .85%;

Gee, one little period can really make a mess of things...

Thanks
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 18, 2008 Feb 18, 2008
LATEST
Brett wrote:
> Hi Steve,
>
>>
>> Use the title tag instead of alt.
>
> I'm not sure I understand. My post showed an excerpt from my page and
> it already has a title. Only one title per page as I understand it.
> The alt= is for accessibility as you say for screen readers, but my
> caption has a <p> paragraph tag. How would the title affect the <p> tag?
>
> Brett
>

I meant for the img tag, use the title property instead of the alt tag.
But it looks like I have misunderstood your post and have confused you
in the process. When you said caption I thought you meant you were
trying to use the ALT text as caption for an image, which is why I
suggested the title property, but thats not what you want either, and I
can't work out what you do want, sorry.

Steve
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines