MyBB Community Forums

Full Version: Center textbox
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2012-08-25, 02:51 PM)NaXuh Wrote: [ -> ]Oh, I see. I looked into it more and did it on my test forum now. It already is "centered" in the table because it has 60% of the table, and the "next question (if you had one)" gets the other 40%.

To center, find this:

<td width="60%"><br /><input type="text" class="textbox" name="regsecureans" value="" id="regsecureans" style="width: 100%;" /><input type="hidden" name="regsecureq_id" value="{$regsecureq_id}" id="regsecureq_id" /></td>
<td align="right" valign="bottom">
{$regq_button}
</td>

And replace it all with this:

<td width="100%"><br /><center><input type="text" class="textbox" name="regsecureans" value="" id="regsecureans" style="width: 60%;" /></center><input type="hidden" name="regsecureq_id" value="{$regsecureq_id}" id="regsecureq_id" /></td>

Please note, this removes the "change question" button that only appears if you have more then one question. If you want that still there (for if you ever want another question), replace instead with this code:

<td width="100%"><br /><center><input type="text" class="textbox" name="regsecureans" value="" id="regsecureans" style="width: 60%;" /><input type="hidden" name="regsecureq_id" value="{$regsecureq_id}" id="regsecureq_id" /><br /><br />{$regq_button}</center></td>

Just did this all on my test forum, it should work fine for you. Hope this helps! Smile.
I have only one question so I don't need that second code. Problem is bescause I can't find that part of code you gived to me. This is my code:
Quote:<fieldset class="trow2">
<script type="text/javascript" src="jscripts/regsecureq.js?ver=100"></script>
<table cellspacing="0" cellpadding="{$theme['tablespace']}">
<tr>
<td colspan="2"><span class="smalltext">{$lang->regq_explain}</span></td>
</tr>
<tr>
<td colspan="2"><br /><span class="smalltext" id="regsecureq" style="font-weight:bold;">{$regsecureq}</span></td>
</tr>
<tr>
<td width="60%"><br />
<center><input type="text" class="textbox" name="regsecureans" value="" id="regsecureans" style="width: 100%;"/></center>
<input type="hidden" name="regsecureq_id" value="{$regsecureq_id}" id="regsecureq_id" /></td>
<td align="right" valign="bottom">
{$regq_button}
</td>
</tr>
<tr>
<td id="regsecureans_status" style="display: none;" colspan="2">&nbsp;</td>
</tr>
</table>
</fieldset>
Replace the whole thing with this:

<fieldset class="trow2">
<script type="text/javascript" src="jscripts/regsecureq.js?ver=100"></script>
<table cellspacing="0" cellpadding="{$theme['tablespace']}">
<tr>
<td colspan="2"><span class="smalltext">{$lang->regq_explain}</span></td>
</tr>
<tr>
<td colspan="2"><br /><span class="smalltext" id="regsecureq" style="font-weight:bold;">{$regsecureq}</span></td>
</tr>
<tr>
<td width="100%"><br /><center><input type="text" class="textbox" name="regsecureans" value="" id="regsecureans" style="width: 60%;" /></center><input type="hidden" name="regsecureq_id" value="{$regsecureq_id}" id="regsecureq_id" /></td>
</tr>
<tr>
<td id="regsecureans_status" style="display: none;" colspan="2">&nbsp;</td>
</tr>
</table>
</fieldset>

Hope this helps! Smile.
(2012-08-25, 10:32 PM)NaXuh Wrote: [ -> ]Replace the whole thing with this:

<fieldset class="trow2">
<script type="text/javascript" src="jscripts/regsecureq.js?ver=100"></script>
<table cellspacing="0" cellpadding="{$theme['tablespace']}">
<tr>
<td colspan="2"><span class="smalltext">{$lang->regq_explain}</span></td>
</tr>
<tr>
<td colspan="2"><br /><span class="smalltext" id="regsecureq" style="font-weight:bold;">{$regsecureq}</span></td>
</tr>
<tr>
<td width="100%"><br /><center><input type="text" class="textbox" name="regsecureans" value="" id="regsecureans" style="width: 60%;" /></center><input type="hidden" name="regsecureq_id" value="{$regsecureq_id}" id="regsecureq_id" /></td>
</tr>
<tr>
<td id="regsecureans_status" style="display: none;" colspan="2">&nbsp;</td>
</tr>
</table>
</fieldset>

Hope this helps! Smile.
It didn't helped. I have problem with forum, I have some errors, so maybe is bescause of that. First I will fix that errors and if it still doesen't work I will write here. Smile Thanks anyway!
Pages: 1 2