2 replies [Last post]
spamme
spamme's picture
Offline
newbie
Last seen: 4 years 43 weeks ago
Timezone: GMT+1
Joined: 2012-02-05
Posts: 2
Points: 3

Hello

Long story short: I have disabled image download from a domain, some input elements (button) on the page are styled with images (background-image) but don't have any value, so when you disable the image download those input elements disappears, I would like to make them visible with some text inside but I don't think is possible with css, do somebody have a good idea?

Example:

<style>.myButtonStyle{background-image:url("SomePictures.png");</style>
<input type="button" style="myButtonStyle">

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 2 hours 15 min ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9597
Points: 3665

Button, button, who's got the button?

Why aren't you using the button element? Use the img's alt attribute to supply text when images are not loaded.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

spamme
spamme's picture
Offline
newbie
Last seen: 4 years 43 weeks ago
Timezone: GMT+1
Joined: 2012-02-05
Posts: 2
Points: 3

Thanks, but it's not my html,

Thanks, but it's not my html, I inject in the page a css with the stylish plugin (https://addons.mozilla.org/en-US/firefox/addon/stylish/).
The problem is that the "Text" of these input button is on the image, if I don't download the images the "text" disappears. Is there a way with css to define the text content of an input button?
For example with the links I can use the :after pseudo class to add text inside the link. But with input doesn't work.