hiding “:)” in sandbox
-
there is a little smiley face “:)” at the bottom of my page. how can I hide it?
-
-
-
BTW, when you set something to “0” (zero), there’s no need to specify the units (px, em, %)… zero is zero.
-
As far as I know the smiley is required to track the visitors and views on your blog.
http://faq.wordpress.com/2006/12/19/why-is-there-a-smiley-on-my-blog/I don’t know if setting display to none affects the WordPress.com stats on your blog, but it might be the reason for mark to propose setting width and height to 0px. I’m pretty sure mark knows about display so I think there must be a reason for his solution.
Cheers, Martin(IQ)
-
display:none will adversely affect stats.
The CSS I put above is from Andy who wrote all the stats code, so I’d go with him.
-
What’s with the smiley face?
When we started developing stats for WordPress.com in 2005, Matt thought it would be cute. That’s his artwork.
No doubt, people will want to hide the smiley face. There are wrong ways to do this. Basically, anything that causes the image not to be loaded by the browser will break your stats.
Applying “display:none” to the image will break your stats. Don’t do it. If you want to hide the smiley face, add this to your stylesheet:
img#wpstats{width:0px;height:0px;overflow:hidden}
http://is.gd/dsCe – Andy’s blog
-
oh, I know what the smiley is for. And I’m sure Mark knows about the display attribute, but he might’ve forgotten about it, or simply didn’t come to his mind a more, let’s say, efficient way to do this.
Setting the display to none, doesn’t affect how the element works. It just doesn’t display it, obviously. Is not as if you’re taking the img element out of the [source] code… that would be different.
-
That’s weird, Mark.
Display none is simply hiding the element. It shouldn’t affect the stats AT ALL. I know about this stuff. I do it on my self-hosted blogs with other stats software that use images and they still track with no effects whatsoever.
But if that’s how you wanna do it, cool. I was just presenting what I believe is “better” way to do it.
-
-
I know nothing of this stuff :)
I thought the above was in the faq but maybe not. I’ll get it added though.
-
:oops: Seems like I have mistaken mark for matt. Sorry, my fault. Just wanted to give a possible explanation for the “0px” thing. Reading devblog’s explanation about loading vs. displaying seems logic to me.
Cheers, Martin(IQ)
-
-
As I said before, I use “display:none” with images from other stats services and their functionality is not affected by this, so not really convinced with what I read on Andy’s blog, I decided to test the “display:none;” with the wp smiley since I last posted in this thread…
Guess what? it still works. The smiley is still collecting data even when set to “display:none;”.
So I’m left to wonder, in what way “display:none;” will break the stats?
Anyway, although this is something trivial, I thought it was still something worthy enough to let you guys know.
Also, another way to hide it is like this:
img#wpstats {visibility: hidden;} -
Just recently, I saw an example where you can set the color and background to inherit. That way, the smiley will be whatever color the background is.
-
With this code, your smiley will load, but will fade into the background.
img.wp-smiley { background:inherit; color:inherit; }
- The topic ‘hiding “:)” in sandbox’ is closed to new replies.