Hi,
I would like to know how to make the label of the checkbox appear next to it, and not under it. This is on the table structure editing page.
The following code appears on one HTML line.
Thanks,
Marc
<td bgcolor="#E5E5E5" align="center"> <input type="hidden" name="field_default_orig[]" size="8" value="CURRENT_TIMESTAMP" /><input id="field_0_7" type="text" name="field_default[]" size="12" value="" class="textfield" /><br /><input id="field_0_7a" type="checkbox" name="field_default_current_timestamp[0]" checked="checked" /><label for="field_0_7a" style="font-size: x-small;">CURRENT_TIMESTAMP</label></td>
Hi Marc!
I would like to know how to make the label of the checkbox appear next to it, and not under it. This is on the table structure editing page.
Which PMA-Template are you using? The default one? Because if I test your HTML snippet isolated in a single HTML page, the label is next to the checkbox without a linebreak; the linebreak is only after the <input type="text"> field.
You can play with "display: inline" or "float: left" of the label and position the label before the checkbox in HTML.
<td bgcolor="#E5E5E5" align="center"> <input type="hidden" name="field_default_orig[]" size="8" value="CURRENT_TIMESTAMP" /><input id="field_0_7" type="text" name="field_default[]" size="12" value="" class="textfield" /><br /><input id="field_0_7a" type="checkbox" name="field_default_current_timestamp[0]" checked="checked" /><label for="field_0_7a" style="font-size: x-small;">CURRENT_TIMESTAMP</label></td>
Regards, Garvin
Hi Garvin,
I am using the "original" theme. Maybe it's the surrounding CSS applied to this table that does the bad effect.
If you are running MySQL 4.1.2+, you can see what I mean by creating a table with a TIMESTAMP then editing this field's structure. If you are < 4.1.2, just modify tbl_properties.inc.php at line 392, removing the test about MySQL version.
In PMA we always position the checkboxes before their label. I tried <label for="field_0_6a" style="float: right; font-size: x-small;">CURRENT_TIMESTAMP</label>
but the label is always on a line by itself.
Thanks,
Marc
Garvin Hicking a écrit :
Hi Marc!
I would like to know how to make the label of the checkbox appear next to it, and not under it. This is on the table structure editing page.
Which PMA-Template are you using? The default one? Because if I test your HTML snippet isolated in a single HTML page, the label is next to the checkbox without a linebreak; the linebreak is only after the <input type="text"> field.
You can play with "display: inline" or "float: left" of the label and position the label before the checkbox in HTML.
<td bgcolor="#E5E5E5" align="center"> <input type="hidden" name="field_default_orig[]" size="8" value="CURRENT_TIMESTAMP" /><input id="field_0_7" type="text" name="field_default[]" size="12" value="" class="textfield" /><br /><input id="field_0_7a" type="checkbox" name="field_default_current_timestamp[0]" checked="checked" /><label for="field_0_7a" style="font-size: x-small;">CURRENT_TIMESTAMP</label></td>
Regards, Garvin
Hi Marc!
I am using the "original" theme. Maybe it's the surrounding CSS applied to this table that does the bad effect.
Okay, now I see. Sorry for not getting your intention in first place.
The reason why the fields are not in the same row is because of whitespace wrapping. As the browser thinks he can put a linebreak between the input and the label element, and the table is already very large, it will wrap the two elements.
The only thing you can do about this is to add a <div style="white-space: nowrap">...</div> around the checkbox and label so that a browser will not cut them into.
HTH, Garvin
Garvin Hicking a écrit :
Hi Marc!
I am using the "original" theme. Maybe it's the surrounding CSS applied to this table that does the bad effect.
Okay, now I see. Sorry for not getting your intention in first place.
The reason why the fields are not in the same row is because of whitespace wrapping. As the browser thinks he can put a linebreak between the input and the label element, and the table is already very large, it will wrap the two elements.
The only thing you can do about this is to add a
<div style="white-space: nowrap">...</div> around the checkbox and label so that a browser will not cut them into.
HTH, Garvin
Thanks, it works correctly now!
Marc