Results 1 to 10 of 10
  1. #1
    Join Date
    Jun 2008
    Posts
    63
    Plugin Contributions
    0

    Default height of the centercolumn

    Does anyone know how I can align the centerColumn with the contentMainWrapper at the bottom so it completely covers the contentMainWrapper. The reason why I want to do this is because centerColumn stops short of the bottom of the page in many pages. I assigned it a different background and border colour so if it stops short of the bottom, part of the both left and right ends (also bottom) remains borderless. I can increase the height of the cC for the pages affected and find the correct height by trial and error but there may be a better approach to the solution.

    Any help appreciated.

  2. #2
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: height of the centercolumn

    contentMainWrapper is a table. The center column is a <td> in this table. One of the Zen is that this <td> does not have its own ID. You can change this by editing tpl_main_page.php to add an ID.

    You are looking for the lines of code that look like this:

    Code:
    ?>
        <td valign="top">
    <!-- bof  breadcrumb -->
    Change them to:

    Code:
    ?>
        <td valign="top" id="newCenterTD">
    <!-- bof  breadcrumb -->
    Then you can apply your styling to the new ID rather than the original center column. The <td> will always be the same height as each other. Whereas the <div>s that they contain are unlikely to be the same height.

  3. #3
    Join Date
    Jun 2008
    Posts
    63
    Plugin Contributions
    0

    Default Re: height of the centercolumn

    Thanks niccol, I'll give it a try.

  4. #4
    Join Date
    Jun 2008
    Posts
    63
    Plugin Contributions
    0

    Default Re: height of the centercolumn

    I did what you suggested but unfortunately I couldn't get it work. I added the code to the tpl_main_page, that's in the folder 'Common' and then applied a new style to the new id. Just for the test I changed the bg colour of the CMW and it worked but the height didn't. Actually, I thought this code would affect the centercolumns but it affects cmv only. Any suggestions?

  5. #5
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: height of the centercolumn

    If you have done it correctly then the ID is for the table cell. The table cell will be the same height as the table (as there is only one row in the table ).

    If you post a URL we can have a look at it.

  6. #6
    Join Date
    Jun 2008
    Posts
    63
    Plugin Contributions
    0

    Default Re: height of the centercolumn

    I am testing it locally so I have no url I can send. I did exactly what you said. What happens is that I can increase the height of the table (the blue area) and it expands all the way down but if I give it a negative value like -100px or even -500, it doesn't get shorter than the left column, just gets stuck at the same level. As you will see in the pic, I want to expand the lighter area so the blue area is not visible and consequently I can put a border around this cC.
    Attached Images Attached Images  

  7. #7
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: height of the centercolumn

    I may be misunderstanding. But the point is that the cells in the table will be the same height.

    To use your example, instead of applying the beige colour to the centerColumn you apply the beige colour to the new ID that you have created and make centerColumn transparent. Then the beige colour will be the same height as the left column whatever happens.

  8. #8
    Join Date
    Jun 2008
    Posts
    63
    Plugin Contributions
    0

    Default Re: height of the centercolumn

    İt is partly OK. The reason why I wanted to increase the height of the centercolumn was to put a border around the cc excluding the navbreadcrumb thing as it has got its own border in different colour. Is there any file where I can add a code, similar to what you suggested previously, and then change the css properties of this code and make all the centercolumns the same height? Adding a border around others other than cc covers navbreadcrumb as well which is not something I want.

  9. #9
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: height of the centercolumn

    If you want to put a border around everything except the breadcrumb you need to add a new div to the code in tpl_main_page.php

    Code:
        <td valign="top">
    <!-- bof  breadcrumb -->
    <?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?>
        <div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
    <?php } ?>
    <!-- eof breadcrumb -->
    
    <div id ="newDiv">
    
    <?php
      if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) {
        if ($banner->RecordCount() > 0) {
    ?>
    <div id="bannerThree" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
    <?php
        }
      }
    ?>
    
    <!-- bof upload alerts -->
    <?php if ($messageStack->size('upload') > 0) echo $messageStack->output('upload'); ?>
    <!-- eof upload alerts -->
    
    <?php
     /**
      * prepares and displays center column
      *
      */
     require($body_code); ?>
    
    <?php
      if (SHOW_BANNERS_GROUP_SET4 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET4)) {
        if ($banner->RecordCount() > 0) {
    ?>
    <div id="bannerFour" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
    <?php
        }
      }
    
    ?>
    
    </div>
    </td>
    Then you can apply a css rule to this:

    Code:
    #newDiv{
    border: 1px solid red;
    height:600px;
    }

  10. #10
    Join Date
    Jun 2008
    Posts
    63
    Plugin Contributions
    0

    Default Re: height of the centercolumn

    Thanks Nic, that's what I've been after.

 

 

Similar Threads

  1. How to use the widht / height with the zen_image function
    By mesnitu in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 12 Dec 2015, 12:43 PM
  2. How to create a gap between the sideboxes and the centercolumn?
    By SeánT in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 27 Sep 2010, 12:14 PM
  3. columnLeft, columnRight and centerColumn are not on the same line
    By dalewz in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 26 Jun 2008, 08:25 PM
  4. Sideboxes and Centercolumn messed to the top with Mozilla but ok with IE
    By Llama de Anor in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 31 Mar 2008, 08:35 AM
  5. Content falling out the bottom of centerColumn
    By richter in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 3 Sep 2007, 11:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR