Forum Moderators: not2easy

Message Too Old, No Replies

Image Alt Tag Font-Size?

         

Sypher_5

10:44 pm on Nov 23, 2003 (gmt 0)

10+ Year Member



Is there anyway to control the size of the text inside of the alt tag?

aevea

6:22 am on Nov 24, 2003 (gmt 0)

10+ Year Member



I could be wrong, but I think it's only controllable from the user's display property settings and can't be modified through css.

Adam

DrDoc

3:36 pm on Nov 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're absolutely correct! It can't be modified using CSS (or anything else). It has to be adjusted by the user...

chadmg

4:09 pm on Nov 26, 2003 (gmt 0)

10+ Year Member



trust the display result to the end-user?!? damn you w3c!

drbrain

5:51 pm on Nov 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The properties of a displayed alt attribute is inherited. It takes on whatever formatting its parent element has.

<span style="font-size: 2em"><img src="foo" alt="2em text"></span>

<img style="font-size: 2em" src="bar" alt="1em text">

DrDoc

6:57 pm on Nov 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No, it doesn't ;)

I assume we're talking the tooltip

drbrain

7:03 pm on Nov 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Oh, tooltips! (For those broken browsers that display alt= as a tooltip.) Yes, agreed. (Same for title=)

I meant when the image doesn't exist (I should have specified src="non_existent_image") the way alt is supposed to work.

DrDoc

7:04 pm on Nov 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



But otherwise, yes, the alt text is supposed to be controlled like any other text. Except for IE, of course :)

g1smd

11:50 pm on Dec 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hmm, I set the default CSS for a page as

body, form, h1, h2, h3, h4, h5, h6, input, li, ol, p, select, td, textarea, tr, ul {
font-family: "trebuchet ms", arial, helvetica, sans-serif; font-weight: bold; }

and that bold style is inherited both in the image alt text and in the link popup title tooltip text every time in Mozilla.

That isn't what I wanted, so I'll have to go back and amend the style sheet again sometime.