Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Jul 2004
    Location
    France
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Regular Coder
    Join Date
    Jul 2004
    Location
    engoku no anime
    Posts
    354
    Thanks
    0
    Thanked 0 Times in 0 Posts
    "color" does not have a transparent value like "background-color" does. Sorry.

  • #3
    New Coder
    Join Date
    Feb 2004
    Location
    london
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <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.

  • #4
    Senior Coder
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    2,469
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 : ::::.:...

  • #5
    Regular Coder
    Join Date
    Jul 2004
    Location
    France
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #6
    Regular Coder
    Join Date
    Apr 2004
    Location
    Birmingham, MI
    Posts
    131
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ummmm... Couldn't you just:
    Code:
    <input type="submit" name="submit" value=" " />

  • #7
    Regular Coder
    Join Date
    Jul 2004
    Location
    France
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 .....

  • #8
    Regular Coder
    Join Date
    Jul 2004
    Location
    France
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •