Skip to content

Commit

Permalink
Fix padding
Browse files Browse the repository at this point in the history
Pading now looks more even when the page is opened
  • Loading branch information
eris6 committed Oct 5, 2024
1 parent 1e4b685 commit 6a54cce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 11 additions & 4 deletions etchasketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ const resize = document.querySelector(".resize");
const clear = document.querySelector(".clear");
let dimension = 16;

container.addEventListener('click', (event)=>{
let target = event.target;

switch(target){
case 'resize':
console.log('hidshfjdisafhjkas');

}
})


resize.addEventListener('click', ()=>{
let newSize = prompt("What size?");
while(container.firstChild){
Expand All @@ -12,7 +23,6 @@ resize.addEventListener('click', ()=>{
createGrid(1);
}


if (newSize > 0 && newSize < 100){
createGrid(newSize);
dimension = newSize;
Expand All @@ -34,9 +44,6 @@ clear.addEventListener('click', ()=>{
})





function createGrid(dimension){
boxSize = getBoxSize(dimension);

Expand Down
2 changes: 1 addition & 1 deletion styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ body{
background-color: #545454;
margin-right: 0;
margin-left: 0;
padding-top: 40px;
padding-top: 20px;
}

.container{
Expand Down

0 comments on commit 6a54cce

Please sign in to comment.