Connecting Tech Pros Worldwide Forums | Help | Site Map

How to hide an image?

Ang Talunin
Guest
 
Posts: n/a
#1: Jul 20 '05
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?

thnx.

A.T.



Fabian
Guest
 
Posts: n/a
#2: Jul 20 '05

re: How to hide an image?


Ang Talunin hu kiteb:
[color=blue]
> Hey,
>
> I've got this code:
> <img width=0 height=0 border=0 src="http://url/cgi/counter.pl/teller"[color=green]
> >[/color]
>
> And i want to make the image invisble. But now i'm getting a small
> dot. Anybody knows how to fix this?[/color]

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.

--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk

Ang Talunin
Guest
 
Posts: n/a
#3: Jul 20 '05

re: How to hide an image?


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?


[color=blue]
> Another option is to place this image next to another larger image that
> you want to be visible, so people won't notice it.[/color]
That's not very nice
[color=blue]
> 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.[/color]
I haven't got much acces permission , otherwise i would be done hours ago...
:-(


Fabian
Guest
 
Posts: n/a
#4: Jul 20 '05

re: How to hide an image?


Ang Talunin hu kiteb:
[color=blue]
> 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?[/color]

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.
[color=blue][color=green]
>> Another option is to place this image next to another larger image
>> that you want to be visible, so people won't notice it.[/color]
> That's not very nice[/color]

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.

--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk


Closed Thread