I don't know how to give a particular question a CSS class, but I was able to identify a CSS handle. By looking over the source code of the survey preview, I identified all <p> of the class "withprefix" that are contained within <div> of the class "answer". In other words:
Code:
div.answer p.withprefix
Rather than constantly fiddling with the template.css file, I implemented the css formatting change using java at runtime. By injecting this code directly into the "Question:" field of question code Q00, this helped me visualize what was going wrong by highlight the problem in red.
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
// highlight the problem in red
$( 'div.answer p.withprefix' ).css({
'color': 'red',
'background-color': 'rgba(255,0,0,0.3)'
});
});
</script>
Using this method, I adopted your suggestion,
but removed ".with-prefix" from the phrase '.numeric.with-prefix input.text'. It seems to have fixed the problem. But I'll have to spend a bit more time troubleshooting, so that I'm confident I haven't caused other trouble by making the handle too broad.
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
// suggested fix by tpartner
// dropped ".with-prefix" from the phrase '.numeric.with-prefix input.text'
$( '.numeric input.text' ).css({
'display': 'inline-block',
'width': 'auto'
});
});
</script>
I've refreshed the screenshot to show the highliting while in effect.