Link to home
Start Free TrialLog in
Avatar of sandshakimi
sandshakimiFlag for United States of America

asked on

Resize Button to Match?

I need the Cancel button to have the same dimension as the Save button.

User generated image
Here's the markup:

<div class="form-actions form-wrapper" id="edit-actions"><button type="button" value="Cancel" onClick="javascript: history.go(-1)">Cancel</button><input type="submit" id="edit-submit" name="op" value="Save" class="form-submit" /></div>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Russ Suter
Russ Suter

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
No points.  A small update to Russ's code.

Make both buttons instead of button and input.  Make buttons same height and width and added padding.

http://jsbin.com/lepayi/edit?html
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>experts-exchange.com/questions/28695080</title>
  <style>
    button
{
    height: 40px;
    width: 80px;
    padding:10px;
}
  </style>
</head>
<body>
<div class="form-actions form-wrapper" id="edit-actions">
  <button type="button" value="Cancel" onClick="javascript: history.go(-1)">Cancel</button>
  <button type="submit" id="edit-submit" name="op"  class="form-submit">Save</button>
</div>
</body>
</html>

Open in new window

Avatar of sandshakimi

ASKER

These are dynamically generated so Russ's approach is the one I was able to use.