diff options
author | Yorhel <git@yorhel.nl> | 2020-07-10 12:00:28 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-07-10 12:00:33 +0200 |
commit | 7b86e5c27ede6341f46e18e393c5448f98e1742e (patch) | |
tree | 8f2992456b4ab2a615507d3b163101a7a9863611 /elm | |
parent | b97dcb4660ef2cc150cce21079a50c955db98312 (diff) |
iv.js/CSS: Use flexbox to keep next/prev buttons aligned at the center
Diffstat (limited to 'elm')
-rw-r--r-- | elm/iv.js | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -46,21 +46,24 @@ function create_div() { ivimg = document.createElement('div'); ivparent.appendChild(ivimg); - ivfull = document.createElement('a'); - ivparent.appendChild(ivfull); + var ivlinks = document.createElement('div'); + ivparent.appendChild(ivlinks); - ivflag = document.createElement('a'); - ivparent.appendChild(ivflag); + ivfull = document.createElement('a'); + ivlinks.appendChild(ivfull); ivprev = document.createElement('a'); ivprev.onclick = show; ivprev.textContent = '« previous'; - ivparent.appendChild(ivprev); + ivlinks.appendChild(ivprev); ivnext = document.createElement('a'); ivnext.onclick = show; ivnext.textContent = 'next »'; - ivparent.appendChild(ivnext); + ivlinks.appendChild(ivnext); + + ivflag = document.createElement('a'); + ivlinks.appendChild(ivflag); document.querySelector('body').appendChild(ivparent); } |