2 replies [Last post]
spamme
spamme's picture
Offline
newbie
Last seen: 2 years 28 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: 23 min 35 sec ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9169
Points: 3156

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

Unplanned code results in a tangled wad of brain-cramping confusion.

There are enough html & css demos and tutorials to be interesting. Please visit.

spamme
spamme's picture
Offline
newbie
Last seen: 2 years 28 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.