[返信する]
名前変換の変換決定ボタン
by 野中
2024-05-31 00:35
名前変換のボタンに関して質問です。
名前や苗字を入力するボックスに比べ、変換決定ボタンが大きくなってしまうのですが、大きさを変更するためにはどうすればいいでしょうか。

<form class="dream" action="#dream_url#"method="post">
<input type="text" name="DreamID[1]" value="苗字"> <input type="text" name="DreamID[2]" value="名前"> <input type="submit" name="set" value="-"></form> </center></details>
の設定です。

pc
[編集]
by 匿名
2024-05-31 13:46
記載されているタグだけですと原因がわかり兼ねます。問題が起きている原因はCSSではないでしょうか。可能であれば、該当の要素に当たっているCSSについても添付をお願いします。アドバイスができるかもしれません。
pc
[編集]
by 野中
2024-06-03 21:00
匿名様
コメントありがとうございます!
少し長いのですが、

<style>
@charset "UTF-8";

/* ウェブフォントの読み込み */
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+1&family=Shippori+Mincho&display=swap');

/* 全体に適用する */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'M PLUS 1', sans-serif;
font-weight: normal;
}

/* 共通 */
:root {
--light-color: #fff;
--dark-color: #161e21;
--color: #aabfd2;
--ja-font: 'Shippori Mincho', serif;
}

/* 基本設定 */
body {
background: var(--dark-color);
line-height: 1.7;
letter-spacing: 0.1em;
text-align: center;
font-size: 13px;
color: var(--light-color);
}

/* リンク */
a {
text-decoration: none;
font-weight: bold;
color: var(--color);
transition: color 1s;
}

/* リンクホバー */
a:hover {
color: var(--light-color);
}

/* 画像 */
img {
margin: 3em auto 0;
width: 70%;
max-width: 400px;
height: auto;
}

/* コンテンツ */
#wrap {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
flex-direction: row-reverse;
margin: 1em auto;
width: 70%;
max-width: 400px;
}

/* ヘッダー */
header {
margin: 0 auto;
flex-basis: 10%;
}

/* 大見出し */
header h1,
header h1 span {
font-family: var(--ja-font);
}

header h1 {
writing-mode: vertical-rl;
letter-spacing: 0.5em;
font-size: 1.5em;
}

header h1 span {
font-size: 1.3em;
}

/* メインコンテンツ */
main {
flex-basis: 80%;
}

/* コンテンツ */
section,
article {
text-align: justify;
word-break: break-all;
line-break: strict;
}

section p {
margin-bottom: 1em;
color: var(--light-color);
}

/* リスト系 */
section ul,
section ol {
margin: 1em auto;
}

section ul {
list-style-type: none;
}

section li {
margin: 0.5em auto;
}

section ol {
list-style-type: none;
counter-reset: item;
}

section ol li::before {
display: inline-block;
counter-increment: item;
content: counter(item)'';
background-color: var(--color);
margin-right: 0.5em;
padding: 0 0.3em;
font-family: var(--en-font);
width: 15px;
height: 1.7em;
text-align: center;
}

/* アーティクル */
article {
margin: 0 auto;
padding: 3em;
max-width: 600px;
background-color: var(--light-color);
color: var(--dark-color);
}

/* アーティクル見出し */
article h1 {
margin-bottom: 1em;
text-align: center;
font-family: var(--ja-font);
}

/* メニュー */
.menu {
text-align: center;
margin: 1em auto 1.5em;
}

.menu li {
display: inline-block;
margin: 0 0.5em;
}

.menu li a {
font-weight: bold;
}

/* フォーム系 */
textarea,
input[type] {
-webkit-appearance: none;
padding: 0.5em;
background: var(--color);
border: none;
border-radius: 0;
font-size: 11px;
color: var(--dark-color);
}

textarea {
width: 200px;
height: 20px;
}

input[type=text] {
width: 80px;
}

input[type=submit] {
width: auto;
}

/* 横幅768px以上で読み込む */
@media screen and (min-width:768px) {
body {
font-size: 14px;
}
}

/* 横幅1024px以上で読み込む */
@media screen and (min-width:1024px) {
body {
font-size: 15px;
}
}

/* 横幅1440px以上で読み込む */
@media screen and (min-width:1440px) {
body {
font-size: 16px;
}
}


</style>




こちらになります。
よろしくお願いします!
pc
[編集]
by 匿名
2024-06-04 12:12
いただいたCSSを確認しました。ありがとうございます。

ナノ側が読み込んでいるcommon.cssというファイルがあるのですが、そちらで高さ(height)80pxが設定されているのが原因ではないかと考えております。

全体的に指定の数値が微妙(heightとpaddingの大きさがコンテンツの高さを圧迫している状態)だったので、以下のような指定に変更することで解決することをおすすめします。

input[type=text] {
width: 80px;
height: auto; /* 追加 */
}

input[type=submit] {
width: auto;
height: auto; /* 追加 */
}

ぜひ試してみてください。他に何かわからない点がありましたらお気軽にどうぞ:)
pc
[編集]
by 野中
2024-06-04 12:48
匿名様

早速のお返事ありがとうございます!
追加したところ完璧な大きさになりました!
ありがとうございます。
自分ではどうにもうまくいかなかったのでとても嬉しいです。
ご対応ありがとうございました!

pc
[編集]

[返信する]
[戻る]
- ナノ -