Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > CSS to hide DIV, but keep space in use.

Reply
Thread Tools

CSS to hide DIV, but keep space in use.

 
 
Noozer
Guest
Posts: n/a
 
      03-12-2006
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?


 
Reply With Quote
 
 
 
 
Els
Guest
Posts: n/a
 
      03-12-2006
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
 
Reply With Quote
 
 
 
 
Noozer
Guest
Posts: n/a
 
      03-12-2006
>> 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.


 
Reply With Quote
 
Els
Guest
Posts: n/a
 
      03-12-2006
Noozer wrote:

>> visibility:hidden;

>
> Thanks Els... I was looking for "visible" and having no luck at all.


http://www.w3.org/TR/CSS21/propidx.html


--
Els http://locusmeus.com/

Now playing: Emerson, Lake & Palmer - New Orleans
 
Reply With Quote
 
Greg N.
Guest
Posts: n/a
 
      03-12-2006
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/
 
Reply With Quote
 
Toby Inkster
Guest
Posts: n/a
 
      03-12-2006
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

 
Reply With Quote
 
Greg N.
Guest
Posts: n/a
 
      03-12-2006
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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pure space directly inside div ignored, but pure space directlyinside span honored liketofindoutwhy@gmail.com HTML 4 03-29-2008 06:06 PM
Why Python style guide (PEP-8) says 4 space indents instead of 8 space??? 8 space indents ever ok?? Christian Seberino Python 21 10-27-2003 04:20 PM
Re: Why Python style guide (PEP-8) says 4 space indents instead of8 space??? 8 space indents ever ok?? Ian Bicking Python 2 10-24-2003 11:15 AM
Re: Why Python style guide (PEP-8) says 4 space indents instead of8 space??? 8 space indents ever ok?? Ian Bicking Python 2 10-23-2003 07:07 AM
Stack space, global space, heap space Shuo Xiang C Programming 10 07-11-2003 07:30 PM



Advertisments