View Full Version : Page hide
Artichoke
08-08-2005, 02:00 AM
i was wondering if there was a html code that could hide the page from one point downwards.
not the page source, just the page content, so no one could see anything else.
please reply.
jscheuer1
08-09-2005, 02:58 PM
<div style="display:none;">
put unseen stuff here
</div>
Artichoke
08-09-2005, 08:07 PM
thanks, but is there soomething that is kind of 'open-ended' that will hide even the stuf below it, without it being in the tag?
How about:
<style type="text/css">
html, body {
display:none;
}
</style>
Then wrap all your content in a <div style="display:block;"></div>.
That'll hide anything outside the div.
jscheuer1
08-09-2005, 10:49 PM
Nope, display is inherited.
I thought it wasn't inherited unless it was set to inherit?
mwinter
08-10-2005, 11:02 AM
I thought it wasn't inherited unless it was set to inherit?Some properties inherit by default. If they do, the property definition will contain, "Inherited: yes".
That said, the display property is not inherited, but the value none is a special case:
none
This value causes an element to generate no boxes in the formatting structure (i.e., the element has no effect on layout). Descendant elements do not generate any boxes either; this behavior cannot be overridden by setting the ’display’ property on the descendants.
-- CSS 2 Specification (http://www.w3.org/TR/REC-CSS2/), 9.2.5 - The display property (http://www.w3.org/TR/REC-CSS2/visuren.html#display-prop)Mike
jscheuer1
08-10-2005, 11:12 AM
It's one of those ones that is inherited anyway due to 'logical containment' (my way of expressing it). Display:none and visibility:hidden are both like that. Opacity is another one. Absolute and relative position are, somewhat as well. Anything that has to do with if you can see something or not is like this. You could wrap everything on the page in a division id="content":
#content {
position:relative;
top:-30000px;
left:-30000px;
}Then wherever you wanted something to show, use:
<div style="position:relative;top:30000px;left:30000px">
Stuff to see goes here
</div>In fact, if you put your 'content' division as the first thing on the page, you wouldn't have to close that tag.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.