Mercurial > hg > webaudioevaluationtool
changeset 3044:2020be3c592c
#126 Improved the layout of AB(X)
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Tue, 26 Sep 2017 17:07:06 +0100 |
parents | 9d4f0934cf34 |
children | f888168418ad |
files | css/core.css interfaces/ABX.css interfaces/ABX.js |
diffstat | 3 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/css/core.css Tue Sep 26 15:13:12 2017 +0100 +++ b/css/core.css Tue Sep 26 17:07:06 2017 +0100 @@ -199,6 +199,7 @@ div.master-volume-holder-inline { width: 100%; padding: 5px; + float: left; } div.master-volume-holder-float { position: absolute;
--- a/interfaces/ABX.css Tue Sep 26 15:13:12 2017 +0100 +++ b/interfaces/ABX.css Tue Sep 26 17:07:06 2017 +0100 @@ -20,9 +20,12 @@ height: 40px; font-size: 1.2em; } +div#submit-holder { + width: 100%; + text-align: center; +} div#box-holders { width: 100%; - text-align: center; } div#playback-holder { float: none;
--- a/interfaces/ABX.js Tue Sep 26 15:13:12 2017 +0100 +++ b/interfaces/ABX.js Tue Sep 26 17:07:06 2017 +0100 @@ -77,15 +77,15 @@ var boxes = document.createElement('div'); boxes.align = "center"; boxes.id = "box-holders"; - boxes.style.float = "left"; + var submitHolder = document.createElement("div"); + submitHolder.id = "submit-holder" var submit = document.createElement('button'); submit.id = "submit"; submit.onclick = buttonSubmitClick; submit.className = "big-button"; submit.textContent = "submit"; - submit.style.position = "relative"; - submit.style.left = (window.innerWidth - 250) / 2 + 'px'; + submitHolder.appendChild(submit); feedbackHolder.appendChild(boxes); @@ -98,7 +98,7 @@ testContent.appendChild(pagetitle); testContent.appendChild(interfaceButtons); testContent.appendChild(feedbackHolder); - testContent.appendChild(submit); + testContent.appendChild(submitHolder); testContent.appendChild(comments); interfaceContext.insertPoint.appendChild(testContent); @@ -425,9 +425,6 @@ boxW = numObj * 312; diff = window.innerWidth - boxW; } - document.getElementById('box-holders').style.marginLeft = diff / 2 + 'px'; - document.getElementById('box-holders').style.marginRight = diff / 2 + 'px'; - document.getElementById('box-holders').style.width = boxW + 'px'; } function buttonSubmitClick() {