Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Feb 2007
    Posts
    159
    Plugin Contributions
    0

    Default How do I add a border to my side boxes?

    I have been searching zen sites and have seen some that have borders on their sideboxes as well as backgrounds within, how do I do that?

  2. #2
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,888
    Plugin Contributions
    0

    Default Re: How do I add a border to my side boxes?

    This is from my stylesheet, you also have to background the leftBoxHeading
    Code:
    .leftBoxContainer {
    	margin-top: 1.0em;
    	border: 1px solid #000000;
    	}
    
    .sideBoxContent {
    	background-color: #ffffff;
    	background-image: url(../images/purpltran45.gif);
    	padding: 0.4em;
    	}
    Mike
    AEIIA - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  3. #3
    Join Date
    Feb 2007
    Posts
    159
    Plugin Contributions
    0

    Default Re: How do I add a border to my side boxes?

    Thank you.

    I also meant to ask how do you add in an image to the border.

  4. #4
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,888
    Plugin Contributions
    0

    Default Re: How do I add a border to my side boxes?

    You can't attach a image to a border, you have to use a background-image on the div. You can simulate an image as border by adding a div that wraps the area you want to border and background-image that. Have I confused you yet. Maybe someday when they release css3 as a standard and the browsers catch up we will be able to use images on the border.

    Oh you could also create a background image that is big enough for the whole sidebox (header, content area, footer) and make it the background of #categories.leftBoxContainer if using it on the categories box. same theory applies to the other boxes just use the id for that box.
    Mike
    AEIIA - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  5. #5
    Join Date
    Feb 2007
    Posts
    159
    Plugin Contributions
    0

    Default Re: How do I add a border to my side boxes?

    Thank you so much for answering my question. That's sort of what I thought was what.

    I got it, the background image WRAPS around the size of the box so if I want a border on both sides I make certain the image is the size of the box with the border image on both sides of the box.

    Cool. That's where creativity goes beyond the box

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

    Default Re: How do I add a border to my side boxes?

    Don't mean to burst your bubble, but in this case you can't get outside the box ;)

    What Mike was saying is that you would make a new div (a bigger box) around the one you want to border, and give that a background-image. You could use padding in the new div to keep its edges spaced out from the original.

    This will work easily for a fixed-size box. If your box changes dynamically, it can still be done but is more complicated and uses two or more outer divs. Google "sliding door method" for some good explanations.

    Have fun!

  7. #7
    Join Date
    Feb 2007
    Posts
    159
    Plugin Contributions
    0

    Default Re: How do I add a border to my side boxes?

    <<What Mike was saying is that you would make a new div (a bigger box) around the one you want to border, and give that a background-image. You could use padding in the new div to keep its edges spaced out from the original.>>

    Ok now I am a bit confused. How do I code this? Where and what.

    Beth

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

    Default Re: How do I add a border to my side boxes?

    If you don't need the background to go beyond the sidebox, there is no complication. I expect that would really work just fine for you.
    So identify the box ID or class (as given by Mike above) and put the border and background-image under it in your stylesheet.
    Make sure you put all your customizations in your template override directory. If you haven't made one yet, read the FAQs about templates.

  9. #9
    Join Date
    Apr 2007
    Posts
    98
    Plugin Contributions
    0

    Default Re: How do I add a border to my side boxes?

    I wanted to add borders to my sideboxes too, and edited my .css as below. Still I can't get the box. What's wrong with it?

    Code:
    .leftBoxHeading, .centerBoxHeading, .rightBoxHeading {
        margin: 0em;
            border: 2px solid #black;
        background-color: #488AC7;
        padding: 0.5em 0.2em;
        }
    
    .leftBoxContainer, .rightBoxContainer {
        margin: 0em
        background-color: #ffffff;
        border: 2px solid #black;
        border-bottom: 5px solid #488AC7;
        margin-top: 1.5em;
        }
    BTW, my site is www.radiomeal.com/index.php

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

    Default Re: How do I add a border to my side boxes?

    You have

    border: 2px solid #black;

    This needs to be either

    border: 2px solid black;

    or

    border: 2px solid #112233;

    (six numbers), not a mixture.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. How to Add SSL Seal to Side Bar Under Side Boxes
    By jacdesigner in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 20 Mar 2009, 08:54 AM
  2. How to add links and buttons to side boxes?
    By Sara's Soaps in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 23 Oct 2008, 06:52 PM
  3. How to add side boxes
    By robin339 in forum Basic Configuration
    Replies: 2
    Last Post: 13 May 2007, 06:20 AM

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