Stephen
Apr 7 2005, 11:42 AM
any idea if there is any CSS I can use so that an image displays its alt text instead of the actual image?
Brendon Koz
Apr 7 2005, 06:19 PM
I did a quick search and found nothing that could do this, at least within the domain of CSS. I believe you could use JavaScript, or perhaps even switch it with PHP depending on the headers sent to the server.
Although CSS is for presentation purposes, I don't believe they ever really thought of that aspect of HTML is presentation.
On another note...does anyone know how to create Microsoft Office Word style pages using CSS during a print job? i.e.: Force tables to the next page, add page headers/footers with numbering, etc...? I've been trying to figure out a way to set margins and such with CSS that would force an overflow type of thing so that text or images could not be cut off, but I don't think I know how to accomplish it...even with PHP.
Stephen
Apr 7 2005, 06:31 PM
Javascript can't modify media specific stylesheets, it will just modify the screen display sheet and using a server side technology defeats the purpose because it would mean having to "reload" a printer friendly page instead
Brendon Koz
Apr 7 2005, 06:42 PM
Ah, I didn't completely understand the purpose you were trying to achieve. My apologies.
-edit-
I found
this just now.
Michael K.
Apr 7 2005, 06:48 PM
I tried using:
CODE
img { display: none; }
img:before { content: attr(alt); }
But apparently :before/:after don't work for images.
Stephen
Apr 7 2005, 07:05 PM
already read that article malikyte it doesn't say anything about images other than hiding them but thanks anyway
Gornakle, apparently it should work but there is a bug in firefox. Don't think IE supports it either