スタイリングの問題がどこにあるかわからないので、私は非常に迷惑になります。私のbtnBox
divはnoteBoxes
divの外に出ています。私は1時間以上それを使いこなしましたが、まだ問題を解決できません.JSについて心配しないでください。私は divをnoteBoxes
divとテキストエリアの右側に配置するのに助けが必要です。どんな助けもありがとうございます。要素がDIVの外に出る
/* textarea styling for notes */
.notesE {
width: 478px;
max-width: 478px;
height: 100px;
margin: 0 auto;
margin-left: 0;
border: none;
padding: 5px;
overflow: hidden;
resize: none;
clear: both;
}
.btnBox {
height: 100px;
border: none;
width: 11px;
clear: both;
top: 0px;
}
/* remove note button */
.removeNote {
width: 10px;
height: 50px;
margin-left: 0;
margin-right: 0;
background-color: #fc7979;
border: none;
cursor: pointer;
margin-top: -4px;
margin-left: 0;
clear: both;
}
.saveNote {
width: 10px;
height: 50px;
margin-left: 0;
margin-right: 0;
background-color: #46e68b;
border: none;
cursor: pointer;
clear: both;
}
/* div that holds note and button and date */
.noteBoxes {
width: 510px;
height: 128px;
margin-bottom: 15px;
}
.dateTxt {
margin-bottom: 0;
margin-top: 0;
color: #ccc;
}
<div id="custNotes" style="width: 550px; margin: 0 auto;">
<h3>
<!-- Customer Value-->Notes</h3>
<button class="options" onclick="addNote()" style="margin-bottom: 10px;">add</button>
<p id="Message"></p>
<div class="notesScroll" style="width: 550px; background-color: #606060; margin: 0 auto;">
<div id="notesBox" style="padding: 10px; width: 510px;">
<!-- <div class="btnBox" style="width: 10px; height: 100px;">
<button class="saveNote"></button>
<button class="removeNote" style="margin-top: -4px; margin-left: 0;"></button>
</div> -->
</div>
</div>
</div>
設定#notesBox { オーバーフロー:隠されました; }ボタンの高さとノートボックスを調整します。 –
#btnBoxがコメントアウトされているのはなぜですか? – Rob
#btnBoxは#noteBox内にとどまります。どのテキストエリアを参照していますか?おそらく "メッセージ"ですか? – Rob