LoginSignup
0
0

More than 5 years have passed since last update.

[CSS] <input type='submit'>のサイズが変わらない

Last updated at Posted at 2019-05-25

CSSでsubmitボタンをいじっていてつまったのでメモ。

submitボタンのサイズが変わらない

sample.html
<input id='sample' type='submit' value='提出'>
sample.css
#submit{
    width:50px;
    height:25px;
    border-radius: 5px;
    box-shadow: 1px 1px 1px;
    border-color:rgb(247, 191, 158);
}

上記のように記述したところsubmitボタンのスタイルにwidth、heightがうまく適用されなかった。

border-style: solid;

の一行を加えてborderのスタイルを指定すると正常に適用されるみたい。

sample.css
#submit{
    width:50px;
    height:25px;
    border-radius: 5px;
    box-shadow: 1px 1px 1px;
    border-color:rgb(247, 191, 158);
    border-style: solid;
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0