Note that there are some explanatory texts on larger screens.

plurals
  1. POalign div content in the middle/center?
    text
    copied!<p>hi can someone please help me with this because i have tried everything.</p> <p>i am trying to align the content of center inside of my div called "wrapper".</p> <p>whatever i do the content just will not align center of the page. hope someone can help me thanks.</p> <p>css:</p> <pre><code>body { font-family:Arial, Helvetica, sans-serif; font-size:medium; color:#3f3f3f; background:#26265d; padding:0; margin:0; text-align:center; } .wrapper {width:100%; overflow:hidden; margin:auto; display:block; text-align:center; position:relative; margin-left:auto; margin-right:auto; } </code></pre> <p>html:</p> <pre><code>&lt;div class="wrapper"&gt; &lt;?php include("includes/mod_home/mod_newest.php"); ?&gt; &lt;/div&gt; </code></pre> <p>php page:</p> <pre><code>&lt;?php $newest_set = get_newest_member(); $newest_count = mysql_num_rows($newest_set); while ($newest = mysql_fetch_array($newest_set)) { $strn = "".$newest['display_name'].""; $max = 13; if(strlen($strn) &gt; $max) { $strn = substr($strn, 0, $max) . '...'; } $photo = "../data/photos/{$newest['id']}/_default.jpg"; if (!file_exists($photo)) { $photo = "../data/photos/0/_default.jpg"; } echo" &lt;div class=\"mod_newest_image\"&gt; &lt;a href=\"profile.php?id={$newest['id']}\"&gt;&lt;img width=95px src=\"".$photo."\"/&gt;&lt;/a&gt; &lt;/div&gt;"; } ?&gt; &lt;style&gt; .new_text{ color:#373775; position:absolute; } .mod_newest_image img{ border:2px solid #6f6f6f; -moz-box-shadow: 0px 0px 5px #CCC; -webkit-box-shadow: 0px 0px 5px #CCC; box-shadow: 0px 0px 5px #CCC; width:95px; height:120px; display:block; float:left; position:relative; margin:3px; } &lt;/style&gt; </code></pre>
 

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