Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Could I offer an alternative? I think both your markup and your css are unnecessarily verbose. This is a slightly rough example, but hopefully is enough to illustrate my point:</p> <pre><code>&lt;style type="text/css"&gt; .statsbox { background: transparent url(path_to_image) no-repeat 9px 20px; float: left; width: 300px; } #stats h3 { } #stats { padding-left: 40px; } #stats ul { padding-left: 1em; } &lt;/style&gt; &lt;div class="statsbox"&gt; &lt;div id="stats"&gt; &lt;h3&gt; User Uploaded Images &lt;/h3&gt; &lt;ul&gt; &lt;li&gt; 122 uploaded images &lt;/li&gt; &lt;li&gt; 13 images pending approval &lt;/li&gt; &lt;li&gt; 15 anonymous images &lt;/li&gt; &lt;li&gt; 97 unique users &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>The key things I'm doing here are:</p> <ol> <li><p>Removing the img element and applying it as a background image of .statsbox instead. This actually gives you lots of flexibility about where the image goes, without it impacting on the other elements in the html.</p></li> <li><p>Avoiding using list-style-postition: inside - using this property means the bullets are basically rendered as a part of the text line they are on; if the lines happen to wrap for any reason, the bullets will fail to line up properly.</p></li> <li><p>Made <code>&lt;p class="statsbox_header"&gt; User Uploaded Images &lt;/p&gt;</code> an h3 instead. You've indicated that it's a heading so you might as well use that element, as it leads to cleaner markup/css.</p></li> <li><p>Removed the class "statsbox" from the <code>&lt;li&gt;</code> elements as CSS inheritance means you should be able to style these just by using a selector such as <code>.statsbox li</code> or similar. Which again makes your markup and styles simpler.</p></li> </ol> <p>Sorry, I'm a bit rushed for time ATM, but if you need me to expand upon this answer, then please just ask :)</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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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