#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Location
    Marbella, Spain
    Posts
    381
    Rep Power
    0

    .css to style form button, looks imposible


    Hi,
    Been searching and been trying but cant find anything so I guess its imposible or I dont search well enough.

    I want to pass a var to another page without using javascript or sessions at that point, so I have 2 options, by get wich I dont like as one can by accident change the value in the url bar, so if get must be encrypted and ever done, and looks complicated.
    The idea I like most is to do by post, but the only way I know of to do with post is to add a submit button and pass the var as hidden. Well I really dont want a submit button, I only want a piece of text with a link, so then I tried to style the button to make it look lika a normal text link. No way, when I add background:transparent the text is not seen.

    Any ideas of how to style the button or some trick to pass by post clicking on a link.
    Thanks in advance,
    Helen
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,301
    Rep Power
    7170
    post values can be changed almost as easily as values in the url.

    If you give a button a solid background color and no border you should be able to make it look like text.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Location
    Marbella, Spain
    Posts
    381
    Rep Power
    0
    Originally Posted by E-Oreo
    post values can be changed almost as easily as values in the url.

    If you give a button a solid background color and no border you should be able to make it look like text.
    Thanks, but I forgot to say that the background is degraded so therefore I tried with transparent but it did not work.
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    119
    Rep Power
    32
    Change the CSS for your button to (don't use background: transparent for your needs):

    Code:
    .submit_bttn {
      background: none;
      border: none;
      cursor: pointer;
    }
    Obviously use the name of the class you will apply to the submit button as what I have used is just for example.

    You could also do it this way (you may or may not need the div name depending on if you have other submit buttons on your site that you don't want to style this way:

    Code:
    .div_name input[type=submit] {
      background: none;
      border: none;
      cursor: pointer;
    }
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Location
    Marbella, Spain
    Posts
    381
    Rep Power
    0
    Originally Posted by simplypixie
    Change the CSS for your button to (don't use background: transparent for your needs):

    Code:
    .submit_bttn {
      background: none;
      border: none;
      cursor: pointer;
    }
    Obviously use the name of the class you will apply to the submit button as what I have used is just for example.

    You could also do it this way (you may or may not need the div name depending on if you have other submit buttons on your site that you don't want to style this way:

    Code:
    .div_name input[type=submit] {
      background: none;
      border: none;
      cursor: pointer;
    }
    Thanks but I tried that, and to be sure I added a div and background: none;
    border: none;
    does not work, if I leave background: none I only see the border, if I leave border: none I dont see anything.
    These values looks like they must have a value.
  10. #6
  11. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    119
    Rep Power
    32
    That is odd as I have exactly this styling working on a site where the 'submit button' is part of a line of text (due to the designer's preference) and it works fine. Therefore I can only think that something else is conflicting with your style for the button.

    Just out of interest (and I am not saying this is the correct way to do things at all, but just for testing purposes) have you tried applying the style inline on the actual submit button to see if it works that way?
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Location
    Marbella, Spain
    Posts
    381
    Rep Power
    0
    Originally Posted by simplypixie
    That is odd as I have exactly this styling working on a site where the 'submit button' is part of a line of text (due to the designer's preference) and it works fine. Therefore I can only think that something else is conflicting with your style for the button.

    Just out of interest (and I am not saying this is the correct way to do things at all, but just for testing purposes) have you tried applying the style inline on the actual submit button to see if it works that way?
    Lol, yep was really odd, when I was going to do inline I saw there was a style with heigth and weight from previous testings so deleting that it works fine thank you.
  14. #8
  15. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    119
    Rep Power
    32
    Glad I could help
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    7
    Rep Power
    0

    button looking in css


    If you want create a button in css then you help on this sites for color effecting button:-
    http://css-tricks.com/circular-3d-buttons/

IMN logo majestic logo threadwatch logo seochat tools logo