Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2009
    Location
    Australia
    Posts
    604
    Plugin Contributions
    0

    Default Help removing some empty space?

    Hi There,

    I can't figure out where some blank space is coming from to remove from my site.

    If you visit:

    www.y o d g e e.com.au/birkenstock/women

    For example.

    You will see the image of the product with the price under it.. however the name of the product is a further 2 lines down.

    How/where do I remove this space?

    Thanks
    That wasn't the plan!

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

    Default Re: Help removing some empty space?

    It's coming from the file modules/yourtemplate/product_listing.php or modules/product_listing.php.

    It looks like you have a modified version of that file so it is hard to comment further. It is not the most straight forward file in the installation so you need to work your way through it and work out where the individual <br/>, which are line breaks, are coming from.

    Or alternatively you could go for a fast and pretty nasty hack which would be to add the following to the bottom of stylesheet.css

    Code:
    .centerBoxContentsProducts br+br{
    display:none;
    }
    Not really recommended but it kind of works.

  3. #3
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,157
    Plugin Contributions
    11

    Default Re: Help removing some empty space?

    They are all under the class centerBoxContent and they are entered as <br> versus the correct <br />. You also have something creating an empty a href in the middle. You probably want to turn the two and three into singles. Remove one after the price and then the <br><br><a href...><br><br> that comes after price. That will leave one <br> between the price and title. You might want to correct the <br /> while there as well.

    On another note, a lot of your images have spaces. This is a no-no and will cause a multitude of code warnings.

  4. #4
    Join Date
    Mar 2009
    Location
    Australia
    Posts
    604
    Plugin Contributions
    0

    Default Re: Help removing some empty space?

    Thanks for the response.

    I do have column grid module installed.

    modules/yourtemplate/product_listing.php

    I'm guessing it needs tweaking in here somewhere ?

    // Following code will be executed only if Column Layout (Grid Layout) option is chosen

    if (PRODUCT_LISTING_LAYOUT_STYLE == 'columns') {

    $lc_text = implode('<br />', $product_contents);

    $list_box_contents[$rows][$column] = array('params' => 'class="centerBoxContentsProducts centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',

    'text' => $lc_text);

    $column ++;

    if ($column >= PRODUCT_LISTING_COLUMNS_PER_ROW) {

    $column = 0;

    $rows ++;

    }

    }

    // End of Code fragment for Column Layout (Grid Layout) option in add on module

    Any suggestions?

    Would prefer do it right rather than edit css. Might stuff something else up :)

    I couldn't find <br /> or <br> with 2 in a row. In fact there are only <br /> and break; in document.


    Thanks
    Last edited by Muzz; 1 Dec 2011 at 09:45 AM.
    That wasn't the plan!

  5. #5
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,157
    Plugin Contributions
    11

    Default Re: Help removing some empty space?

    Just clicked into a product. You need to add a Please Select Your Size option to be display only and default or a customer can simply click add to cart and you won't know if they really needed the 10 or not.
    I would also recommend you take a look at the Fual Slimbox add-on.

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

    Default Re: Help removing some empty space?

    this line

    Code:
    $lc_text = implode('<br />', $product_contents);
    puts a break between each element of the array. If some of the elements are empty then it will appear that there are two breaks or three in a row. You need to go deeper and find which elements you are not using and remove them from the array first.

    the css won't mess anything else up because it only has effect in that div. But you are right that the php solution is better.

    (for clarity $product_contents is an array. it has multiple elements. column grid 'amalgamates' the array into a single string by using 'implode' so that all the elements, that would normally be in different chunks, end up in a single string. )
    Last edited by niccol; 1 Dec 2011 at 09:59 AM.

  7. #7
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,157
    Plugin Contributions
    11

    Default Re: Help removing some empty space?

    Strange... Firebug shows them all as <br>

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

    Default Re: Help removing some empty space?

    Oh, and they are <br/> not <br>. They just don't look like it when you view it in developers tools. It's a weird thing that happens in developer's tools, but it does not show like that in the source.

    Firebug and developers tools 'clean up' the code in various ways which is not a brilliant feature :-)

  9. #9
    Join Date
    Mar 2009
    Location
    Australia
    Posts
    604
    Plugin Contributions
    0

    Default Re: Help removing some empty space?

    Yes.. looking in chrome it shoes it as <br><br>

    This must be how it reads it... was doing my head in.

    Thanks for all your help.

    I only have a very basic understanding php as it is. Was getting a bit much.

    I have used the css edit to resolve for now.

    Thanks!

    As for The add to cart option I do have this off in my admin. It still displays. I did have this off at some stage but think a mod killed it.

    As for fuel slimbox this on. I had ajax image swapper installed on my site. But after another mod install I overwrote a file I shouldn't have and accidently over my back up.

    I know I need to fix but don't want to kill my website. Will do this when I have time time create mock local web server.

    Thanks again.
    That wasn't the plan!

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

    Default Re: Help removing some empty space?

    Well, if it works it works. As dbltoe rightly says there are other errors on there but, yes, a good way of doing this is to work on a development version of the site. Do find the time to make one - it will save you headaches in the future.

    If you want to separate the rows a bit you might try:

    Code:
    .centerBoxContentsProducts{
    margin-bottom:20px;
    }

 

 

Similar Threads

  1. Removing empty space
    By dabone in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 23 Apr 2009, 09:12 AM
  2. Removing some space on the main page...
    By milobloom in forum General Questions
    Replies: 19
    Last Post: 22 Feb 2009, 03:54 PM
  3. Removing the empty space in product listing view
    By Outlawlb in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 19 Feb 2007, 09:10 AM

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