Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default $this_is_home_page <div> image containger </div> causes white space on other pages?

    Using the code from the page, here:

    http://www.zen-cart.com/content.php?...ll-other-pages

    I've transalted it this in tpl_footer.php:

    PHP Code:
    <?php if($this_is_home_page) { ?>

    <div id="HPFooterBadges" >

    <!--HTML IMAGES CONTAINER-->

    HTML CONTENT HERE

    <!--HTML IMAGES CONTAINER-->

    </div>

    <?php ?>

    Works in so far as the content is displayed only on the home page but on the other site pages it's created an empty row of white space where the images are on the home page. All it's doing is hiding the images, not the <div></div>

    Anyone know how to hide the div?

  2. #2
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: $this_is_home_page <div> image containger </div> causes white space on other page

    Quote Originally Posted by limelites View Post
    Using the code from the page, here:

    http://www.zen-cart.com/content.php?...ll-other-pages

    I've transalted it this in tpl_footer.php:

    PHP Code:
    <?php if($this_is_home_page) { ?>

    <div id="HPFooterBadges" >

    <!--HTML IMAGES CONTAINER-->

    HTML CONTENT HERE

    <!--HTML IMAGES CONTAINER-->

    </div>

    <?php ?>

    Works in so far as the content is displayed only on the home page but on the other site pages it's created an empty row of white space where the images are on the home page. All it's doing is hiding the images, not the <div></div>

    Anyone know how to hide the div?
    Something else is going on here.?
    I use exactly the same code in my footer and it works fine as it should.
    No divs are present on other pages.
    Got a link?
    Last edited by gilby; 28 Feb 2014 at 10:52 AM.

  3. #3
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: $this_is_home_page <div> image containger </div> causes white space on other page

    Quote Originally Posted by gilby View Post
    Something else is going on here.?
    I use exactly the same code in my footer and it works fine as it should.
    No divs are present on other pages.
    Got a link?
    Whoops, sorry it's www.silkblooms.co.uk

  4. #4
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: $this_is_home_page <div> image containger </div> causes white space on other page

    You don't see any div's when you inspect the other pages but the white space under the footer wasn't there before I added this div on the home page

  5. #5
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: $this_is_home_page <div> image containger </div> causes white space on other page

    Quote Originally Posted by limelites View Post
    You don't see any div's when you inspect the other pages but the white space under the footer wasn't there before I added this div on the home page
    Yes this is working exactly as it should.

    On long pages you have a "Scroll to Top" feature at the bottom of the page. This takes up some space.
    On short pages this doesn't show but the space is still there.
    This "feature" takes up the same amount of space whether it shows or not.
    I suspect this needs further investigation!

  6. #6
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: $this_is_home_page <div> image containger </div> causes white space on other page

    Ahhh, so that's the culprit! Thanks Gilby, I'll set a min-height:0; on the scroll to top feature. Hopefully that'll solve it.

 

 

Similar Threads

  1. v139h How to get div#NavEZpagesTop on same line as div#NavMain
    By idc1 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 12 Mar 2013, 06:16 PM
  2. Placing a DIV on product info pages
    By DML73 in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 18 Jun 2011, 11:17 PM
  3. Can't get logo div and horizontal menu div to touch
    By Chuckwa in forum Templates, Stylesheets, Page Layout
    Replies: 14
    Last Post: 28 May 2010, 07:16 PM
  4. Remove Category Image/Description div on product pages
    By Webbo1969 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 12 Sep 2009, 02:05 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