Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2013
    Posts
    48
    Plugin Contributions
    0

    Default Modifying margins / padding WITHIN a sidebox

    my website is www.toyzeum.com/store/


    this is what I want my sidebox to look like:

    Name:  whatsnewcompleted.jpg
Views: 197
Size:  51.8 KB

    this is the current coding i have in my styles.css file


    #whatsnewHeading {display: none;}
    #whatsnew {border: none;}

    #whatsnew.rightBoxContainer {
    background-image: url(https://www.toyzeum.com/store/images...finds_bg.jpg);
    height:260px!important;
    width:293px!important;
    margin: 2em;
    border-top: 5px;
    border-bottom: 0px;
    margin-top: 5em;
    }


    I am still new to CSS and am not sure how to modify within the sidebox... rightBoxContainer is obviously modifying the entire box in ways that I dont want (as seen on my page)... How do I get the padding / margins for the links and content within the sidebox only?

    Thanks for your help.

    -Aaron

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,977
    Plugin Contributions
    96

    Default Re: Modifying margins / padding WITHIN a sidebox

    The first problem is that you've got your Configuration->Layout Settings->Column Width (Left/Right) Boxes and Configuration->Layout Settings->Column Width (Left/Right) values reversed, so you're trying to cram 293px worth of stuff into 270px. Try reversing those before attempting further changes via CSS.

  3. #3
    Join Date
    Mar 2013
    Posts
    48
    Plugin Contributions
    0

    Default Re: Modifying margins / padding WITHIN a sidebox

    actually- it all fits perfectly when i change the coding above to:


    #whatsnew.rightBoxContainer {
    background-image: url(https://www.toyzeum.com/store/images...finds_bg.jpg);
    height:260px!important;
    width:293px!important;
    margin: 0em;
    border-top: 0px;
    border-bottom: 0px;
    margin-top: 0em;
    }

    So that obviously is not the problem... i posted it up above as such to show what happens when i change the margins / borders with #whatsnew.rightBoxContainer... it moves the entire box rather than what is inside the box... i want to focus on the formatting within the whatsnew sidebox... how do i do that... ??? anyone??

  4. #4
    Join Date
    Oct 2012
    Posts
    109
    Plugin Contributions
    0

    Default Re: Modifying margins / padding WITHIN a sidebox

    I think they problem is some css conflicting with your div tags. In it you have your right side text as sideBoxContentItem, which is being controlled by other css functions. I would open up style sheet and create new css rules for that sideBoxContentItem.

    Try adding this into your stylesheet

    .sideBoxContentItem{
    padding-top:25px;
    padding-left:10px;
    }
    Last edited by KenshiroU; 26 Apr 2013 at 04:17 PM.

  5. #5
    Join Date
    Mar 2013
    Posts
    48
    Plugin Contributions
    0

    Default Re: Modifying margins / padding WITHIN a sidebox

    You Got it to work KENSHIRO- THANK YOU SO MUCH!!! Do you know if this modification will effect any other sideboxes in Zen cart or only the Whatsnew sidebox? Im not sure if any other sideboxes use "sideBoxContentItem" - THANKS AGAIN!!!

    -Aaron

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Modifying margins / padding WITHIN a sidebox

    So that obviously is not the problem...
    It may or may not be the actual cause of your issue, but it is incorrect and could cause issues. It would be sensible to change the admin settings so that Column Width - Right is at least as large as Column Width - Right Boxes. Then the elements won't be unnaturally forcing the layout to stretch.

    I believe the featured sidebox also uses .sideBoxContentItem. If you want to limit your styling to the what's new sidebox, use a selector like
    #whatsnew .sideBoxContentItem {}.

 

 

Similar Threads

  1. How do I Add Padding or Margins Between Sideboxes?
    By THE-EDL in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 14 Dec 2009, 01:47 PM
  2. Adjusting Margins/Padding for Sub Category Listing
    By skydivebob in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 3 Mar 2009, 10:15 PM
  3. Having trouble with margins/padding
    By litepockets in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 13 Feb 2009, 09:50 PM
  4. Margins and Padding
    By DieuxSoldat_04 in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 12 Feb 2008, 07:51 AM
  5. Banner Box Margins or padding in side columns
    By gogolf in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 16 Sep 2007, 10:48 PM

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