Hide a div embedded in a php page using only css

Posted on 2008-11-16
Last Modified: 2012-05-05
I'm making some custom mods to Zen Cart. In one of the php files, this code displays a category description on the screen:

<div id="indexProductListCatDescription" class="content"><?php echo $current_categories_description;  ?></div>
<?php } // categories_description ?>

I don't want the description to show. I know that I can just add a "//" in front of the echo, and that gets rid of it. But I'd rather do it in the css file.

I thought I could just add this line to the css file:

div#indexProductListCatDescription { display: none; }

But it doesn't work. The description still shows.
Question by:alicia1234
    LVL 15

    Accepted Solution


    div#indexProductListCatDescription { visibility: hidden; }

    also check if the original style of class "content" and id "indexProductListCatDescription" already contains some style about display or visibility.

    Author Comment

          div#indexProductListCatDescription { visibility: hidden; }
    did the trick.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
    This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
    In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
    In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now