Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP echo position in codeigniter
    primarykey
    data
    text
    <p>I'm a newbie to web development, so this might sound dumb.</p> <p>I was trying to echo a form.</p> <pre><code> &lt;tr&gt; &lt;td&gt;&lt;?php echo form_label($login_label, $login['id']); ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo form_input($login); ?&gt;&lt;/td&gt; &lt;td style="color: red;"&gt;&lt;?php echo form_error($login['name']); ?&gt;&lt;?php echo isset($errors[$login['name']])?$errors[$login['name']]:''; ?&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;?php echo form_label('Password', $password['id']); ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo form_password($password); ?&gt; &lt;/td&gt; &lt;td style="color: red;"&gt;&lt;?php echo form_error($password['name']); ?&gt;&lt;?php echo isset($errors[$password['name']])?$errors[$password['name']]:''; ?&gt;&lt;/td&gt; &lt;/tr&gt; </code></pre> <p>The login form appears at the top left of the webpage. Is there any way to position this into the center of the page or move it around the page.</p> <p>Thanks for the help.</p> <p><strong>EDIT:</strong></p> <p>I tried doing this:</p> <pre><code>&lt;style&gt; #content { width:500px; margin:0 auto ; text-align:center; } &lt;/style&gt; &lt;div id='content'&gt; &lt;tr&gt; &lt;td&gt;&lt;?php echo form_label($login_label, $login['id']); ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo form_input($login); ?&gt;&lt;/td&gt; &lt;td style="color: red;"&gt;&lt;?php echo form_error($login['name']); ?&gt;&lt;?php echo isset($errors[$login['name']])?$errors[$login['name']]:''; ?&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/div&gt; </code></pre> <p>This moved the login form down but not to the side. Any ideas?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload