View Full Version : color:transparent is not working

10-07-2004, 03:46 PM
I am trying to get a background for an input buton type submit but I wanted tio hide the text .. is there anyway with css ?

I don't want to use a buton type image

thank you

10-07-2004, 04:20 PM
"color" does not have a transparent value like "background-color" does. Sorry.

10-07-2004, 08:02 PM
<div> tags are transparent as default and you could set the z-index: 20; (for example)
z-index sets the stacking order of your div's so twenty should bring it out on top. Thats the theory anyway, i haven't properly tested it myself. :D

10-07-2004, 08:31 PM
Why don't you just use an image for the submit button instead? That would look cooler anyway.

If you wanted to hide the text still, you could try an image replacement technique I use, though I've never tried it on an input button, so this may not work:

#submit {
width: 100px;
height: 40px;
text-indent: -5000px;

Name your submit button id="submit" to apply it. If that doesn't work, try:

font-size: 1px;

Again, though, if you're hiding the text, it'll look like an ugly blank button (unless you're on a Mac like me and then it'd be a blank beautiful aqua button:) ) -- an image would probably be better:

<input type="image" src="submit.png" id="submit" name="submit" value="submit" />

10-07-2004, 09:45 PM
z-index ? maybe I must try

why I don't use an image button ??
try to get the REquest.Form and you wil see ...in certain cases
when you want more than one button with same name and differents values

you get 2 values for images buttonName.x and buttonName.y
that sounds like a HTML old bug

but I can try your method .. it should work
I was trying

<input type="submit" value="add" name="action" id="action"
style="width:70px;height:24; border:0;
background-position:50% 50%;

of course not to get a blank button

my problem is to remove the text and keep the value

thank you

10-08-2004, 08:01 PM
Ummmm... Couldn't you just:

<input type="submit" name="submit" value=" " />

10-09-2004, 07:54 AM
but in that case how do you get many values ?

what I am using is

<input type="submit" name="action" value="1" />
<input type="submit" name="action" value="2" />
<input type="submit" name="action" value="3" />

Select case Request.Form("action")
case 1
....do action 1
case 2
.... do action 2
case 3

but a customer wants grafics .....

10-09-2004, 08:22 AM
it was very simple :-)

Function GetAction
dim t
if Request.Form("action")<> "" then
t = Request.Form("action")
t = ""
End if
End Function
<?xml version="1.0" encoding="iso-8859-1"?>
<!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1" />
<title> grafic action </title>
<style type="text/css" rel="stylesheet">
background-position:50% 50%;
<form id="MainForm" method="post" action="default.asp">
action = <%GetAction%>
<br />
<input type="submit" value="1" name="action" id="action_id" class="btn" />
<input type="submit" value="2" name="action" id="action_id" class="btn" />
<input type="submit" value="3" name="action" id="action_id" class="btn" />