Forum Moderators: open

Message Too Old, No Replies

hide a things on the web pages!?

hide a things on the web pages!?

         

script33

11:46 am on Jul 8, 2007 (gmt 0)

10+ Year Member



4 example i use a webstat that the icon of that counter is very horrid
how i can hide it in my web pages 4 a good style?

4 example i can hide it with a layer or div?

plz teach me...

Marshall

12:16 pm on Jul 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Insert your counter, or whatever, into a <div>:

<div id="hide_content" style="display:hidden;">
INSERT WHATEVER
</div>

The style="display:none;" is the key/important part.

Marshall

script33

12:31 pm on Jul 8, 2007 (gmt 0)

10+ Year Member



The style="display:none;"?
where is it?
where i insert it?

Marshall

12:56 pm on Jul 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Place the tag below
<div id="hide_content" style="display:hidden;">
BEFORE the item you want to hide.

THEN place the item you want to hide.

THEN PLACE
</div>
AFTER the item you want to hide.

Marshall

script33

1:01 pm on Jul 8, 2007 (gmt 0)

10+ Year Member



style="display:none;"
is not intransitive?
i dont insert it?

script33

1:08 pm on Jul 8, 2007 (gmt 0)

10+ Year Member



what is your thought about this code?:
<div style="position:relative;visibility:hidden">
your code
</div>

which one is better?

Marshall

1:17 pm on Jul 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



visibility: hidden hides the element, but it still takes up space in the layout.

display: none removes the element completely from the document. It does not take up any space, even though the HTML for it is still in the source code

So it depends what effect you want: whether or not it should take up space. Also, visability:hidden if often associated with javascript, especially when you toggle an element to be seen or not say when clicking on an informational link.

Marshall

innocbystr

4:05 am on Jul 9, 2007 (gmt 0)

10+ Year Member



Thanks Marshall (& script33). Glad I read this thread. I didn't know there was such a thing! I'm already using it and you're right, the hidden object doesn't take up any space. Super!

Thanks again,
Blair

Marshall

4:16 am on Jul 9, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You're more than weclome. Glad to help when I can.

Marshall