Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31
  1. #1
    Join Date
    Sep 2009
    Location
    Gold Coast, Australia
    Posts
    40
    Plugin Contributions
    0

    Default Sidebox Table & Image Problem

    I have a question, i'm getting there slowly regarding the layout but i'm encountering one hurdle i can't get over. On my site i want the sideboxes to be contained in a table that is 3 cols by 3 rows with the main data contained in the middle col/row. The outer cols/rows contain images making up a bordered table. My problem is that i don't know how to get this to work!

    I've made the table data in HTML and have created the images, but the problem seems to be as soon as i try and insert PHP data into the HTML it goes haywire.

    An example can be seen here..

    The first 4 sideboxes work fine, purely because they're all HTML. The ones underneath with the plain square layout are the ones i want to change but can't! I've spent a day and a half trying to fix this to no avail so any help will be appreciated.

    cheers


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

    Default Re: Sidebox Table & Image Problem

    You're asking for help with a technique without telling us what you really want to accomplish. Are you just trying to have rounded boxes for the sideboxes? You don't need any tables for that; you can use the existing Zen Cart div structure and your stylesheet to do it all.

  3. #3
    Join Date
    Sep 2009
    Location
    Gold Coast, Australia
    Posts
    40
    Plugin Contributions
    0

    Default Re: Sidebox Table & Image Problem

    My apologies, i thought the site would provide enough reference for my question, what i want to accomplish is this:

    I want all of the Sideboxes on my site [ie: reviews, information, curency, who's online etc] to be contained within a table that uses images to border it, not just stylesheet borders.

    If you go to this site you'll see four tables to the left bound by a white/orange rounded rectangular table, then you'll see five square tables. I want these square tables to look like the top four tables [the orange/white ones]. THE SITE IS HERE

    I'm sorry if i'm not explaining this cohesively, but i don't have a great deal of experience working with PHP, and certainly not with PHP/HTML in one file.

    thanks for replying.

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

    Default Re: Sidebox Table & Image Problem

    Okay, as I thought, you just want rounded sideboxes. You don't need tables. All of this can be done with a couple of images for the top and bottom of the sideboxes, and some stylesheet rules.

    Start by putting all of your blank_0x.gif images together in Photoshop (or go to the original box image if you have one), and slice it into three parts: a top that is a bit taller than the sidebox heading (probably 25px), a bottom that is just tall enough to hold the curves (16px), and a middle with both straight side borders. Save them as (for example) sidebox_top.gif, sidebox_bottom.gif and sidebox_middle.gif, in /includes/templates/your_template/images/.

    Then add to your stylesheet
    Code:
    .leftBoxContainer {
        background: url(../images/sidebox_bottom.gif) no-repeat bottom center;
        padding-bottom: 16px;
        }
    .leftBoxHeading {
        background: url(../images/sidebox_top.gif) no-repeat top center;
        }
    .sideBoxContent {
        background: url(../images/sidebox_middle.gif) repeat-y;
        }

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

    Default Re: Sidebox Table & Image Problem

    BTW, in case it wasn't obvious, make the combined box image the same width as your finished sideboxes.

  6. #6
    Join Date
    Sep 2009
    Location
    Gold Coast, Australia
    Posts
    40
    Plugin Contributions
    0

    Default Re: Sidebox Table & Image Problem

    You are an absolute legend! I didn't realise it would be so easy to get this done. I still have two problems though.

    1 is that there is still a white border around the sideboxes, i want this removed, and the 2nd problem is all images are the same width [147px] yet the middle is out of whack and hangs to the left giving it an off-kilter look.

    So far so good though, i'm extremely thankful of you for taking the time to help me here


  7. #7
    Join Date
    Sep 2009
    Location
    Gold Coast, Australia
    Posts
    40
    Plugin Contributions
    0

    Default Re: Sidebox Table & Image Problem

    I have figured out how to remove the border, but now i'm getting a gap between the top image and the middle, it seems to be bigger and smaller depending on the table as well.

    Same deal with the middle being off-centre to the top and bottom images. All images are exactly 147pixels wide so i figured they should all fit in a uniform manner.

    This one i can't figure out.

  8. #8
    Join Date
    Sep 2009
    Location
    Gold Coast, Australia
    Posts
    40
    Plugin Contributions
    0

    Default Re: Sidebox Table & Image Problem

    Ok apologies but i have realised i had my default box size set to 150, it works great now! But still i'm getting the gap between the top image and the background...

    where should i look to fix this?

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

    Default Re: Sidebox Table & Image Problem

    When I posted before, the sidebox heading divs were 24px high; now they are 31px high. Apparently the top image is now 30px high.
    You could center the background for the middle section if you need to with
    Code:
    .sideBoxContent {
        background: url(../images/sidebox_middle.gif) repeat-y center center;
        }

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

    Default Re: Sidebox Table & Image Problem

    For website styling and other work, you should get Firefox and its Web Developer and Firebug extensions. They have tools that can show you quickly what elements to apply styling to, and try things on the fly. These are the tools that let us give exact answers to questions like yours.

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. Sidebox heading & background image
    By marknew in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 5 May 2011, 09:18 AM
  2. Unusual Data Problem with &image=
    By warrisr in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 19 Dec 2008, 09:17 PM
  3. Header Image problem & link
    By atjhza in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 23 Nov 2007, 06:14 PM
  4. Credit Card Sidebox & shopping cart with image
    By deemurphy in forum Basic Configuration
    Replies: 1
    Last Post: 25 Aug 2007, 03:59 PM
  5. Image Rotator & CSS Flyout sidebox
    By Berserker in forum Basic Configuration
    Replies: 2
    Last Post: 31 Jan 2007, 01:01 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