Timeline for Can I style an image's ALT text with CSS?
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 19, 2014 at 9:58 | comment | added | Mikko Tapionlinna | katsampu, the original question asked about targeting the alt text, In your answer you are talking about "style only the alternative text". This statement is incorrect. This does not target the text, but the image element around it. If I set img[alt]{border:1px solid red;padding:10px;} those changes effect the image itself, not the alt text. Some changes may be inherited into the alt text too (depending on browser implementation). But it does not only style the alt text like you said. It styles only image elements that have alt text attribute. See the difference? | |
Jun 18, 2014 at 9:57 | comment | added | katsampu | You can use a class on image or a regular expression on src to target the specific image. Simple css my friend. | |
Jun 5, 2014 at 12:57 | comment | added | Mikko Tapionlinna | This does not focus on the alternative text, but instead on any image element that contains alt-attribute. | |
Mar 13, 2014 at 13:02 | history | answered | katsampu | CC BY-SA 3.0 |