Link to home
Start Free TrialLog in
Avatar of Rodney Parker
Rodney ParkerFlag for Mexico

asked on

<form> Button format

I had ths code:

<a href="agenda.asp" style="color: #007E00;"><h3>CRM</h3></a>


I am using a form instead:

<form method="post" action="agenda.asp">


<input type="submit"  value="CRM">

</form>


¿How can I have the value="CRM" show up with the font and color of the href?






Avatar of Scott Fell
Scott Fell
Flag of United States of America image

It is really best to keep a button as a button instead of a link. It can be confusing to some people, especially those that are perhaps visually impaired. It is also just confusing to see a link as a button. But this is one way to do it.


https://jsbin.com/pexakopihi/edit?html,output


<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>test</title>
  <style>
    button.btnLink{
      background:none;
      border:none;
      color:blue;
      text-decoration:underline
    }
  </style>
</head>
<body>
  <form method="post" action="agenda.asp">
  <input type="hidden" name="btnType" value="crm">
  <button class="btnLink" type="submit">CRM</button>
  </form>  
</body>
</html>

Open in new window


Avatar of Rodney Parker

ASKER

Great


How can I setup my href to use he same formatting as the<form>

I am not sure what you mean.  If you mean to keep the form looking like a link, then make all of the fields hidden and nobody will know it is a form without looking. 


Or do you mean to format the href link to  look like a button?

HiI just need the text in <h3</h3> in the href link to look like the one in the form

ASKER CERTIFIED SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial