x_maras Posted June 19, 2009 Share Posted June 19, 2009 Hi, I want to make a submit button which will have an image as a background. This button needs to have a value, but I dont want this value to appear in the page. I know the <input type="image"> but I would like another solution with css beacause I don't want to manage the button with javascript. I tried the following css in these browsers: mozilla 3 / google chrome 2.0 / opera 9 / safari 4 / ie 7 /*does n't work with ie and opera tested in: mozilla, opera, chrome, safari, ie )*/ input.test { background-image:url('webserver.png'); width: 64px; height: 64px; color:transparent; border: 0px solid #FFFFFF; } /*Doesn't work with ie only (tested in: mozilla, opera, chrome, safari, ie )*/ input.button{ background-image:url('webserver.png'); width: 64px; height: 64px; text-indent:-9999px; border: 0px solid #FFFFFF; } /*does n't work with ie and opera tested in: mozilla, opera, chrome, safari, ie )*/ #name{ background-image:url('webserver.png'); width: 64px; height: 64px; color: transparent; text-transform: capitalize; border: 0px solid #FFFFFF; } /*Doesn't work with ie Actually this is the best solution, because works in all the other browsers and in the ie doesn't show the text but it still shows a dot (a little bigger than a dot), which is visible especialy if the background images color is light. */ input.submit { background-image: url('webserver.png'); width: 64px; height: 64px; font-size: 0px; border: 0px solid #FFFFFF; } Link to comment https://forums.phpfreaks.com/topic/162884-make-the-value-of-a-submit-button-invisible/ Share on other sites More sharing options...
x_maras Posted June 19, 2009 Author Share Posted June 19, 2009 Sorry I didnt said what I d like to do. I there a way to make it work for ie also? Link to comment https://forums.phpfreaks.com/topic/162884-make-the-value-of-a-submit-button-invisible/#findComment-859478 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.