Results 1 to 9 of 9
  1. #1
    Join Date
    May 2008
    Posts
    257
    Plugin Contributions
    0

    Default sidebox layout problem

    hi, everyone,

    Does anybody know how to specify the width for one specific sidebox, such as best_seller

    seems that in Zen-cart, all the sidebox always agree to the width of $column_box_default, that is class=.leftBoxContainer or class=.rightBoxContainer, whose width can be set through Admin-->layout setting

    Now supposed i set the .leftBoxContainer and .rightBoxContainer to 170px, but i ONLY want the sidebox
    best_seller to be 200px, how to achieve this?

    Any suggestion would be appreciated.

  2. #2
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,369
    Plugin Contributions
    0

    Default Re: sidebox layout problem

    I'm not sure if a stylesheet change can override the settings from admin, but maybe if you set the width of that particular sidebox in the stylesheet using the !important addition to the definition, it'll work. See here for how to use !important.

    Be sure your column width is set wide enough for the 200px sidebox, or Bad Things will happen.

    Rob
    Breakfast: the most important donut of the day.

  3. #3
    Join Date
    May 2008
    Posts
    257
    Plugin Contributions
    0

    Default Re: sidebox layout problem

    hi, rstevenson,

    how genious you are! really appreciated for your great answers.
    it works.

    but could you please explain further why the MAX. width is 200px?

  4. #4
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,369
    Plugin Contributions
    0

    Default Re: sidebox layout problem

    Well, you gave as an example of what you're trying to do...
    Now supposed i set the .leftBoxContainer and .rightBoxContainer to 170px, but i ONLY want the sidebox
    best_seller to be 200px, how to achieve this?
    If your left column was 170px wide and you tried to put a 200px wide sidebox into it, either the sidebox wouldn't be 200px wide, or -- more likely -- the column width would be forced out to 200px anyway, and that could throw off other parts of your site design if you're not expecting it.

    THIS JUST IN ...

    I decided to put it to the test. On my retail site (link below) I entered this into the stylesheet...

    #information {width: 200px !important;}

    The result was that my Information sidebox expanded right out past the borders of the left column, running right over top of text in the centercolumn area. In my case this would not be a good thing, but depending on your design, this might work for you.

    All you can do is try it and see, I guess.

    Rob
    Breakfast: the most important donut of the day.

  5. #5
    Join Date
    May 2008
    Posts
    257
    Plugin Contributions
    0

    Default Re: sidebox layout problem

    hi, Rob ,

    Many thanks for your patient explanation.

    what great retails sites!!
    wonderful job.

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    21,820
    Plugin Contributions
    25

    Default Re: sidebox layout problem

    In IE (older versions at least), the whole column may expand to 200px. It is not supposed to according to CSS standards, but we know about IE and standards...

  7. #7
    Join Date
    May 2008
    Posts
    257
    Plugin Contributions
    0

    Default Re: sidebox layout problem

    Hi, Glenn,

    Can not agree with you any more.

    Yes, the whole column expanded to 200 px.

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    21,820
    Plugin Contributions
    25

    Default Re: sidebox layout problem

    If you use
    margin-right: -30px;
    in the individual sidebox rule, it should allow the sidebox to overrun the column edge. Sometimes this might not work in older IE either, though - depends on a hidden IE property "has_layout" which needs to be triggered.

  9. #9
    Join Date
    May 2008
    Posts
    257
    Plugin Contributions
    0

    Default Re: sidebox layout problem

    hi, Glenn,

    maybe this is the way we want.
    will try to test it.

 

 

Similar Threads

  1. categories sidebox layout
    By ivanc in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 19 Dec 2008, 06:45 AM
  2. Problem with sidebox layout
    By JMcGov in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 27 Jun 2008, 07:02 PM
  3. ebay sidebox layout changes
    By Graffxman in forum Basic Configuration
    Replies: 13
    Last Post: 16 Apr 2007, 12:37 AM
  4. Sidebox and other layout issues
    By iZilla_Pod in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 12 Sep 2006, 11:18 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
  •