How to hide an image?

F

Fabian

Ang Talunin hu kiteb:
Hey,

I've got this code:
<img width=0 height=0 border=0 src="http://url/cgi/counter.pl/teller"

And i want to make the image invisble. But now i'm getting a small
dot. Anybody knows how to fix this?

width and height attributes have a minimum value of 1. You can use
style sheet to set the display attribute to none, and provided you give
the image an id or a name attribute, you can use javascript to
manipulate this.

If all you want is for the image to be invisible, with no image
manipulation in-page, I suggest the following code:

---snip---

---end snip---

Another option is to place this image next to another larger image that
you want to be visible, so people won't notice it.

Since this appears to be a hit counter image, I suspect it would be more
efficient to look at your server logs. Presumably you don't have acess
to them.
 
A

Ang Talunin

Ok, so i tried this::

<img class="b" width=0 height=0 border=0
src="http://url/cgi/counter.pl/teller" >

and this in the <head>:

<style>
img.b {
display: block;
}
</style>

But that isn't working...

What's wrong with it?


Another option is to place this image next to another larger image that
you want to be visible, so people won't notice it.
That's not very nice
Since this appears to be a hit counter image, I suspect it would be more
efficient to look at your server logs. Presumably you don't have acess
to them.
I haven't got much acces permission , otherwise i would be done hours ago...
:-(
 
F

Fabian

Ang Talunin hu kiteb:
Ok, so i tried this::

<img class="b" width=0 height=0 border=0
src="http://url/cgi/counter.pl/teller" >

and this in the <head>:

<style>
img.b {
display: block;
}
</style>

But that isn't working...

What's wrong with it?

Try

<style type="text/css">
<!--
img.b { display: none; }
// -->
</style>

Note the keyword "none". Also, as I said earlier, width=0 is NOT a valid
attribute. Only integers 1 or greater are valid. Same goes for height.

One point: If you do successfully set it not to show, some browsers
might 'intelligently' decide to save bandwidth by not downloading a file
that the browser knows won't be displayed at all.
That's not very nice

Neither are images that serve no useful function in the interface from
the visitor's pov.

Last point, if you are actually paying for your web space as a
particular service (as opposed to, say, web access plus web space as a
package), and they wont give access to logs at all, complain loudly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top