I am modifying for my purpose the phpbb poll display. This is my current html code when result display is on:
<div class="content">
<h2>Question</h2>
<p class="author">bla bla <strong>אחת</strong></p>
<dl class="">
<dt><label for="vote_1">option1</label></dt>
<dd style="width: auto;"><input type="radio" name="vote_id[]" id="vote_1" value="1" /></dd><dd class="resultbar"><div class="pollbar" style="width:77%">10</div></dd>
<dd>77%</dd>
</dl>
<dl class="">
<dt><label for="vote_2">Option 2</label></dt>
<dd style="width: auto;"><input type="radio" name="vote_id[]" id="vote_2" value="2" /></dd><dd class="resultbar"><div class="pollbar" style="width:23%">3</div></dd>
<dd>23%</dd>
</dl>
<dl class="">
<dt><label for="vote_3">Option 3</label></dt>
<dd style="width: auto;"><input type="radio" name="vote_id[]" id="vote_3" value="3" /></dd><dd class="resultbar"><div class="pollbar" style="width:0%">0</div></dd>
<dd>No votes</dd>
</dl>
<dl>
<dt> </dt>
<dd class="resultbar">Total : 13</dd>
</dl>
<dl style="border-top: none;">
<dt> </dt>
<dd class="resultbar"><input type="submit" name="update" value="submit" class="button1" /></dd>
</dl>
</div>
<span class="corners-bottom"><span></span></span></div>
<input type="hidden" name="creation_time" value="1326810654" />
The problem is this: in phpbb, the elements have the same width as the "content" div, and so they are displayed line-by-line. However, in my code the elements have width 0 (what is the exact meaning of width 0? On-screen they have width larger than 0) and all the -s are displayed in the same line.
I looked around the css files, but as far as I can see there is no difference. What is the relevant property here? Setting 's "width" style option in the css file to 100% and "inherit" has no effect.
The code looks like a strange presentation of tabular data (something that should be presented using <table>
elements), and probably the intent is to use CSS for the purpose but somehow the relevant CSS code has gone missing.
Without CSS, each dt
and dd
element is rendered each on a line of its own, because this is the default rendering in HTML.
The percentage widths are presumably meant to act as graphic representation of percentages, so that e.g. 73% corresponds to a 73% wide block. This cannot be seen, however, without some CSS that makes the blocks visible with e.g. border or background color. The idea fails e.g. for 0%, for obvious reasons.
Without more context, including CSS being applied, it’s difficult to say much more.