I am creating a feedback system, were there are questions with 5 check boxes for "Unwilling", "Not Ready", "Ready", "Completely Ready" etc...
Each check box is numbered from 1 to 5 above the check boxes. Since the client needs to add different labels for the check boxes, their lengths will be different so this needs to change with CSS rather than be fixed.
Here was a photoshop mock-up from our designer of what I am suppose to create in CSS.
https://i.stack.imgur.com/Y8XyG.jpg
How could I align the numbers above the check box like this?
I already have the outside box, and the start of the number part:
CSS:
.questionBlock {
overflow: hidden;
box-sizing: border-box;
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */
width: 700px;
min-height: 40px;
background-color: rgb(246,246,246);
margin-top: 20px;
background-image: url('../images/bar.png');
background-repeat: repeat-x;
padding: 4px 0 0 10px;
}
.questionBlockExpand {
overflow: hidden;
box-sizing: border-box;
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */
width: 700px;
height: 100px;
background-color: rgb(246,246,246);
margin-top: 20px;
padding: 10px 0 0 10px;
margin-top: 20px;
}
.innerQuestionBlock {
postion:relative;
width:650px;
background-color:rgb(204,204,204);
padding:5px 5px 5px 5px;
}
HTML:
<div class="questionBlock">At the end of the session ask the Feedback Recipient the following question:
<div class="arrow" id="arrowsection1" onclick="toggle_visibility('section1');"></div>
<div class="questionBlockExpand" id="section1" style="display:none;">
<div class="innerQuestionBlock"><span class="red">1 2 3 4 5</span>
</div>
</div>
</div>