File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Problem hiding div within div Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Problem hiding div within div" Watch "Problem hiding div within div" New topic

Problem hiding div within div

nick angel
Ranch Hand

Joined: Dec 14, 2005
Posts: 39
Hello to everyone. Not too long ago I began working with css files. The problem I am currently having is hiding a div within a div. My overall jsp page looks like the following:

The relevenat portions of my css are as follows:

The problem i am having is as follows. The pages I am creating are being built as jsps and as blocks (tiles) and then assembled together. I can call one of the subunits of the page delimited by the following div:

What I wish to add to my css file is the ability ( once the subunit containing only the above div is isolated) to have the display property of the <div id="image"> set to none when not encased by the <div id="contenant">.

Any help would greatly be appreciated. I am sorry if the question is not very clear.
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
If there is nothing else in that wrapper div, why don;t you just hide that one by setting the display to none?

you could also try something like

#contenu div {display:none;}

I agree. Here's the link:
subject: Problem hiding div within div
jQuery in Action, 3rd edition