Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This would be a CSS solution, PHP can't position images. With CSS you can position things in many different ways:</p> <ol> <li>Using margins (e.g., margin: <em>top right bottom left</em>;)</li> <li>Using paddings (e.g., padding: <em>top right bottom left;</em>)</li> <li>Using floats (e.g., float: <em>right or left;</em>)</li> <li>Using positions (e.g., position: <em>absolute or relative;</em> and then using top/left and bottom/right to position).</li> </ol> <p>For example, you can center your image to the middle of the page using margins. Add this to the top of your page:</p> <pre><code>&lt;style type="text/css"&gt; /*Initializing CSS code*/ img { margin: 0 auto; } &lt;/style&gt; </code></pre> <p>Or you can float the image to the far right of your page using a float, assuming the parent object has a width of 100%:</p> <pre><code>&lt;style type="text/css"&gt; /*Initializing CSS code*/ img { float: right; } &lt;/style&gt; </code></pre> <p>Or using an absolute position to position it at the bottom right:</p> <pre><code>&lt;style type="text/css"&gt; /*Initializing CSS code*/ img { position: absolute; right: 0px; bottom: 0px; } &lt;/style&gt; </code></pre> <p>You may want to read a CSS tutorial to learn the differences between all the positioning techniques and when to use them and where + little hacks, annoyances and incidents that come when you use each of them.</p> <p><a href="http://www.google.com/search?q=css+tutorial" rel="nofollow">http://www.google.com/search?q=css+tutorial</a></p>
 

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