0
help
help align the text in the center https://code.sololearn.com/Wn9n2WeyEt21/?ref=app
7 odpowiedzi
+ 1
Change your textContent to innerHTML and use flex
createBtn.innerHTML = "<div>запуск</div>";
//дураку понятно жто стили.
createBtn.style = "position:fixed;top:350px;left:0;background-color:orange;width:60px;height:60px; display: flex; justify-content: center; align-content: center;flex-direction: column";
+ 1
window.onload = function() {
let dv = document.createElement("div");
dv.style = "text-align:center;";
document.body.appendChild(dv);
let btn = document.createElement("button");
btn.id = "pusk";
btn.textContent = "запуск";
btn.style = "background-color:orange;";
dv.appendChild(btn);
}
0
Jay Matthews bro is not work ing.. sorry
0
thanks evebordy
0
https://code.sololearn.com/WMfOFm4bA9eD/?ref=app
Hope this helps
- 1
body{
text-align: center;
}
- 1
Jay Matthews plz send my your working code ok?