CSS to hide DIV, but keep space in use.

Discussion in 'HTML' started by Noozer, Mar 12, 2006.

  1. Noozer

    Noozer Guest

    I'm sure I've seen this, but it's been a while and cannot remember how it
    was done.

    If I set the "display" CSS property to 'block' makes the DIV take space up
    in the HTML page and displays it's content. Setting this property to 'none'
    makes the DIV disappear as though it never existed. BUT, I'm sure I've seen
    another value that will hide the content of the DIV, but will STILL use up
    the space in the HTML page.

    Does this make sense? Does anyone know how it's done?
     
    Noozer, Mar 12, 2006
    #1
    1. Advertising

  2. Noozer

    Els Guest

    Noozer wrote:

    > I'm sure I've seen this, but it's been a while and cannot remember how it
    > was done.
    >
    > If I set the "display" CSS property to 'block' makes the DIV take space up
    > in the HTML page and displays it's content. Setting this property to 'none'
    > makes the DIV disappear as though it never existed. BUT, I'm sure I've seen
    > another value that will hide the content of the DIV, but will STILL use up
    > the space in the HTML page.
    >
    > Does this make sense? Does anyone know how it's done?


    visibility:hidden;

    --
    Els http://locusmeus.com/

    Now playing: Emerson, Lake & Palmer - Hallowed Be Thy Name
     
    Els, Mar 12, 2006
    #2
    1. Advertising

  3. Noozer

    Noozer Guest

    >> If I set the "display" CSS property to 'block' makes the DIV take space
    >> up
    >> in the HTML page and displays it's content. Setting this property to
    >> 'none'
    >> makes the DIV disappear as though it never existed. BUT, I'm sure I've
    >> seen
    >> another value that will hide the content of the DIV, but will STILL use
    >> up
    >> the space in the HTML page.


    > visibility:hidden;


    Thanks Els... I was looking for "visible" and having no luck at all.
     
    Noozer, Mar 12, 2006
    #3
  4. Noozer

    Els Guest

    Els, Mar 12, 2006
    #4
  5. Noozer

    Greg N. Guest

    Noozer wrote:

    > will hide the content of the DIV, but will STILL use up
    > the space in the HTML page.


    If you're trying to do this in order to make Search bots see some
    content that the users are not supposed to see, _don't!_

    Google is supposedly working very hard to detect such tricks and has
    announced to penalize pages that use such tactics. Whether you really
    intend SE deception or not will obviously not matter.

    --
    Gregor mit dem Motorrad auf Reisen:
    http://hothaus.de/greg-tour/
     
    Greg N., Mar 12, 2006
    #5
  6. Noozer

    Toby Inkster Guest

    Greg N. wrote:
    > Noozer wrote:
    >
    >> will hide the content of the DIV, but will STILL use up
    >> the space in the HTML page.

    >
    > If you're trying to do this in order to make Search bots see some
    > content that the users are not supposed to see, _don't!_


    Gievn that the OP doesn't want the space taken up by the text to collapse,
    I would assume that this isn't the intention.

    Rather the OP probably wants to hide the text, and then re-show it in
    response to some user action.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Mar 12, 2006
    #6
  7. Noozer

    Greg N. Guest

    Toby Inkster wrote:

    >>If you're trying to do this in order to make Search bots see some
    >>content that the users are not supposed to see, _don't!_

    >
    >
    > Gievn that the OP doesn't want the space taken up by the text to collapse,
    > I would assume that this isn't the intention.


    I think so, too. But Google, in its growing anti-spam fury, might not
    be smart enough to understand.

    I must admit I'm getting paranoid. Any text color too close to the
    background color, any overflow:hidden, visibility:hidden, display:none,
    any positioning that might under some circumstances move off the
    viewport - I think twice. Yes, paranoia... maybe. :)

    --
    Gregor mit dem Motorrad auf Reisen:
    http://hothaus.de/greg-tour/
     
    Greg N., Mar 12, 2006
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shuo Xiang

    Stack space, global space, heap space

    Shuo Xiang, Jul 9, 2003, in forum: C Programming
    Replies:
    10
    Views:
    2,912
    Bryan Bullard
    Jul 11, 2003
  2. Christian Seberino
    Replies:
    21
    Views:
    1,671
    Stephen Horne
    Oct 27, 2003
  3. Ian Bicking
    Replies:
    2
    Views:
    1,021
    Steve Lamb
    Oct 23, 2003
  4. Ian Bicking
    Replies:
    2
    Views:
    730
    Michael Hudson
    Oct 24, 2003
  5. Replies:
    4
    Views:
    796
    Ben C
    Mar 29, 2008
Loading...

Share This Page