[wp-hackers] WP.com Stats Image

Andy Skelton skeltoac at gmail.com
Tue Jun 19 06:28:05 GMT 2007

On 6/18/07, Matt <speedboxer at gmail.com> wrote:
> Wouldn't img#wpstats {visibility: hidden;} also work?

Have you tried it? IIRC visibility makes the element invisible but the
element still takes up space and affects layout.

CSS 2.1 Spec says:
"The 'visibility' property specifies whether the boxes generated by an
element are rendered. Invisible boxes still affect layout (set the
'display' property to 'none' to suppress box generation altogether)."

However, browsers have been known to skip loading any images falling
under a display:none rule. Thus using display:none will hurt your
stats. Forcing the image's dimensions to zero does not have this bad
effect. That explains the recommended CSS rule set.

If you want, you can try this instead:
img#wpstats {
width: 100%;

On http://andyskelton.com/ it really ties the page together.


More information about the wp-hackers mailing list