Results 1 to 8 of 8

Thread: Page hide

  1. #1
    Join Date
    Aug 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Page hide

    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.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    <div style="display:none;">
    put unseen stuff here
    </div>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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?
    Last edited by Artichoke; 08-09-2005 at 08:09 PM.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    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.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Nope, display is inherited.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I thought it wasn't inherited unless it was set to inherit?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    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.
    Mike

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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":
    Code:
    #content {
    position:relative;
    top:-30000px;
    left:-30000px;
    }
    Then wherever you wanted something to show, use:
    HTML Code:
    <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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •