Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11
    Join Date
    Dec 2005
    Location
    Maidstone, Kent, UK
    Posts
    339
    Plugin Contributions
    3

    Default Re: Change Attribute Position With CSS?

    Ah I think you may be a little confused over what part Im talking about, no offense, on the site the orange bosxes are the attributes, where as the table son the right I placed inside the product info display page manualy and they are indeed tables.

    The attributes are setup through admin, so since there is not any specific code to place them into tables, I was not able to locate where these are. Hence al I could do was CSS them to change the way they lok, but from what I can tell they are not inside tables at all.

    The code that displays any attributes is inside a table but even centering that table makes no difference.

    The orange boxes will never exceed 5, and are setup to fit a 1024/768 display without altering their position, since most people (according to the stats I have looked at on other sites) use that resolution instead of the older and less popular 800/600.

    I would like to try and have all 5 boxes as they are now centered in the display.

    I did notice when I view the source with fireworks, they do seem to be a table within a table within a table, but I cant see how this is created from the php codes.

  2. #12
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Change Attribute Position With CSS?

    I think if I read what you're asking, you want to center the "orange" boxes, right?

    Try this:
    /includes/templates/YOURTEMPLATE/templates/tpl_modules_attributes.php
    around line 42 you have:
    Code:
    <?php
    if ($options_attributes_image[$i] != '') {
    ?>
    <?php echo $options_attributes_image[$i]; ?>
    <?php
    }
    ?>
    <br class="clearBoth" />
    change that to:
    Code:
    <div class="attribWrapperForMyBoxes">
    <?php
    if ($options_attributes_image[$i] != '') {
    ?>
    <?php echo $options_attributes_image[$i]; ?>
    <?php
    }
    ?>
    </div>
    <br class="clearBoth" />
    and then set a new class in your stylesheet for:
    Code:
    .attribWrapperForMyBoxes {text-align: center; }
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #13
    Join Date
    Dec 2005
    Location
    Maidstone, Kent, UK
    Posts
    339
    Plugin Contributions
    3

    Default Re: Change Attribute Position With CSS?

    I have added this but am not sure it changed anything, lol.

    The text I think I had centered ok, but I want the boxes that the text sit in that have the orange inside them centered at the bottom of the page?

  4. #14
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Change Attribute Position With CSS?

    Ironically, your boxes very much want to go to the center. Change
    .attribWrapperForMyBoxes {text-align: center; }
    to
    .attribWrapperForMyBoxes {width:425px}
    and they won't be able to get there fast enough.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v151 Trying to change attribute text and position
    By doooomed in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 20 Mar 2013, 09:03 PM
  2. Change Position Of Product Name With Grid View
    By hcd888 in forum Addon Templates
    Replies: 6
    Last Post: 16 Feb 2012, 04:13 PM
  3. Please help with attribute font and add to cart position problem
    By lgsd56 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Apr 2010, 03:50 AM
  4. CSS Flyout Header Position
    By gee38l in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 8 Dec 2008, 10:58 PM
  5. Problem with attribute position
    By snow-man in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 3 Nov 2008, 11:06 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