Forums

[resolved] A CSS Problem with wp_list_categories (8 posts)

  1. Bülent Sakarya
    Member
    Posted 8 months ago #

    I've a css problem with wp_list_categories.

    if there are sub-categories height:200px; or height:0;

    How can i do it?
    Thanks.

  2. alchymyth
    The Sweeper
    Posted 8 months ago #

    please post a link to your site to illustrate the problem.

  3. Bülent Sakarya
    Member
    Posted 8 months ago #

    URL with sub-categories: http://connect16.com/firma/alisveris/
    URL without sub-categories: http://connect16.com/firma/alisveris/alisveris-merkezleri/

    if the category doesn't have a sub-category, becomes an empty place under the category title.

    How can i remove it?

    Thanks.

  4. alchymyth
    The Sweeper
    Posted 8 months ago #

    please post the code of that category section -

    everything from:

    <div id="sol">
    		<div id="kategori">

    to:

    </div>
    		<div class="clear"></div>
    		<div id="icerik">

    a: the ul tags are missing;
    b: it might help to add another <div class="clear"></div> bit there;
    c: style.css needs changing to an automatic height in the style of #sol #kategori

  5. Bülent Sakarya
    Member
    Posted 8 months ago #

    Can i check, it's a main category or sub-category?

  6. Bülent Sakarya
    Member
    Posted 8 months ago #

    Category Listing Code;

    <?php
     $cat = get_query_var('cat');
     wp_list_categories('child_of='.$cat.'&title_li=&show_option_none=&depth=0');
    ?>
  7. alchymyth
    The Sweeper
    Posted 8 months ago #

    try to change the respective section to:

    <div id="sol">
    		<div id="kategori">
    <h1>????use the existing code here??????</h1>
    <ul>
    <?php
     $cat = get_query_var('cat');
     wp_list_categories('child_of='.$cat.'&title_li=&show_option_none=&depth=0');
    ?>
    </ul>
    <div class="clear"></div>
    </div>
    		<div class="clear"></div>
    		<div id="icerik">
    .......

    (hopefully you should be able to identify and change that above section)

    and change the styles to:

    #sol #kategori {
      width:730px;
      height:auto;
    padding-bottom: 10px;
      background-image:url(images/alt-arkaplan.jpg);
      border-bottom:1px solid #ddd;
      border-top:1px solid #ddd; }
  8. Bülent Sakarya
    Member
    Posted 8 months ago #

    Oh yesss. Thanks alchymyth..

Reply

You must log in to post.

About this Topic