title: Override a css class in a div
body: <p>I have a <code>div</code> (page between menu stuff) inside a <code>div</code> (some random buttons) next to another <code>div</code> (<code>div</code> next to random buttons) I want to center text in the last div. Both  and style=text-align didn't work as well as adding a new class, the last thing I tried was using a span to center it</p>
  
  <pre><code>&lt;span style="text-align:center"&gt;&lt;?php echo $tUser."'s profile";?&gt;&lt;/span&gt;
  </code></pre>
  
  <p>It doesn't center in the div which has <code>maxwidth:500px</code> (so the text should center at 250px), it just stays where it was. </p>
  
  <p>All divs have their own classes, and I can't seem to override the text to center it within the last div.</p>
  
  <p><a href="http://prntscr.com/3fhwuy" rel="nofollow">http://prntscr.com/3fhwuy</a></p>
  
  <p>That's the third div</p>
  
  <pre><code>&lt;div style="maxwidth:500px;" class="userprofile"&gt;
                  &lt;?php if($_SESSION['profilepage']=="vievprofile"){// VIEV PROFILE
                  addPointer($pointer,174,145);?&gt;
                  &lt;p style="margin: 0 auto"&gt;&lt;?php echo $tUser."'s profile";?&gt;&lt;/span&gt;
  
   &lt;/div&gt;
  </code></pre>
  
  <p>None of the classes has a <code>float:left;</code>.</p>
  
  <p>" Make up your mind, is it a p or a span? –  jeroen 1 min ago "
  It's a stone. Actually, whatever works.</p>
  
  <p>Fixed with position:absolute, not the best fix though.</p>