Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-07-2004, 02:46 PM   PM User | #1
gwendaal
Regular Coder

 
Join Date: Jul 2004
Location: France
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
gwendaal is an unknown quantity at this point
color:transparent is not working

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
gwendaal is offline   Reply With Quote
Old 10-07-2004, 03:20 PM   PM User | #2
gohankid77
Regular Coder

 
Join Date: Jul 2004
Location: engoku no anime
Posts: 354
Thanks: 0
Thanked 0 Times in 0 Posts
gohankid77 is an unknown quantity at this point
"color" does not have a transparent value like "background-color" does. Sorry.
__________________
Spread Firefox!
Get Firefox!
gohankid77 is offline   Reply With Quote
Old 10-07-2004, 07:02 PM   PM User | #3
spenoir
New Coder

 
Join Date: Feb 2004
Location: london
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
spenoir is an unknown quantity at this point
<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.
spenoir is offline   Reply With Quote
Old 10-07-2004, 07:31 PM   PM User | #4
bradyj
Senior Coder

 
Join Date: Apr 2003
Location: San Francisco, CA
Posts: 2,469
Thanks: 0
Thanked 0 Times in 0 Posts
bradyj is an unknown quantity at this point
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:
Code:
#submit {
width: 100px;
height: 40px;
text-indent: -5000px;
Name your submit button id="submit" to apply it. If that doesn't work, try:
Code:
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:
Code:
<input type="image" src="submit.png" id="submit" name="submit" value="submit" />
__________________
// Art is what you can get away with. <-- Andy Warhol
...:.:::: bradyjfrey.com : htmldog : ::::.:...
bradyj is offline   Reply With Quote
Old 10-07-2004, 08:45 PM   PM User | #5
gwendaal
Regular Coder

 
Join Date: Jul 2004
Location: France
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
gwendaal is an unknown quantity at this point
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-image:url(b_add.gif);
background-position:50% 50%;
background-repeat:no-repeat;
background-color:transparent;color:none;"
/>

of course not to get a blank button

my problem is to remove the text and keep the value



thank you

Last edited by gwendaal; 10-07-2004 at 08:48 PM..
gwendaal is offline   Reply With Quote
Old 10-08-2004, 07:01 PM   PM User | #6
circusbred
Regular Coder

 
Join Date: Apr 2004
Location: Birmingham, MI
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
circusbred is on a distinguished road
Ummmm... Couldn't you just:
Code:
<input type="submit" name="submit" value=" " />
circusbred is offline   Reply With Quote
Old 10-09-2004, 06:54 AM   PM User | #7
gwendaal
Regular Coder

 
Join Date: Jul 2004
Location: France
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
gwendaal is an unknown quantity at this point
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 .....
gwendaal is offline   Reply With Quote
Old 10-09-2004, 07:22 AM   PM User | #8
gwendaal
Regular Coder

 
Join Date: Jul 2004
Location: France
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
gwendaal is an unknown quantity at this point
it works

it was very simple :-)

<%
Function GetAction
dim t
if Request.Form("action")<> "" then
t = Request.Form("action")
else
t = ""
End if
Response.Write(t)
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">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1" />
<title> grafic action </title>
<style type="text/css" rel="stylesheet">
body
{
background-color:ivory;
}
.btn
{
background-color:#ffeebb;
background-image:url(go.gif);
background-position:50% 50%;
background-repeat:no-repeat;
width:20px;
height:20px;
font-size:0;
}
</style>
</head>
<body>
<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" />
</form>
</body>
</html>
gwendaal is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:10 PM.


Advertisement
Log in to turn off these ads.