Skip to content

Commit

Permalink
スマホでのレイアウトのバグを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
bem130 committed Jul 7, 2024
1 parent d7acf4e commit b212ea5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@
}));
setInterval(() => {
table.style.setProperty('--periodictable-fontsize',
(table.getBoundingClientRect().width/periodicTable[0].length/2)+"px"
(table.parentElement.getBoundingClientRect().width/periodicTable[0].length/2)+"px"
);
}, 10);
return elm("div",{class:"center"},[table]);
return elm("div",{class:"center",id:"tablearea"},[table]);
},
input: ()=>{return elm("div",{tabIndex:1,class:["inputarea"]},[
elm("div",{class:["inputelm"]},[
Expand Down Expand Up @@ -306,7 +306,7 @@
.periodic {
padding: 10px;
table-layout: fixed;
width: fit-content;
width: 100%;
height: fit-content;
& td {
font-size: var(--periodictable-fontsize);
Expand Down

0 comments on commit b212ea5

Please sign in to comment.