P
P
PageUp2021-07-21 04:21:56
css
PageUp, 2021-07-21 04:21:56

How can input type="submit" be made to take on a different form?

The button for sending data to the server does not want to change the appearance of the button. I want to stretch it to full screen, make it wide, but it's still square. I tried different options for changing the class, I wrote the style in Input{, I tried other options in BUTTON {, I looked for a solution on the sites, they recommend it everywhere as indicated below, but this method does not work either. The color of the button changes, the color of the text, but it itself is still in the form of a typical square button. What's wrong?

<input class="MYbutton" type="submit" value="КНОПКА"></form>


input[type=submit] {
  display: block;
  margin: 0 auto;
  font-size: 1.5em;
  font-weight: bold;
  background: #2A2924;
  margin-bottom: 4px;
  padding: 16px;
  color: #F3E6D0;
  background: rgba(0,0,0, 0.3);
  -webkit-border-radius:8px;
  -moz-border-radius:8px;
  border-radius:8px;
}


Decided by adding to the class

width: 100%;
outline:none;
border: none;


The button stretched and the 3D button effect (shadow) disappeared, and it became flat, as intended.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Dubrovin, 2021-07-21
@PageUp

Any button in the form will trigger the submit event - style it
Check the styles. In the code inspector.
Whether the file is connected.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question