# HG changeset patch # User Nicholas Jillings # Date 1506442026 -3600 # Node ID 2020be3c592c9dd7c85823e6094081832225f764 # Parent 9d4f0934cf34d2af1e382fec6e98bf1a40b451c9 #126 Improved the layout of AB(X) diff -r 9d4f0934cf34 -r 2020be3c592c css/core.css --- 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; diff -r 9d4f0934cf34 -r 2020be3c592c interfaces/ABX.css --- 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; diff -r 9d4f0934cf34 -r 2020be3c592c interfaces/ABX.js --- 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() {