Results 1 to 10 of 13

Hybrid View

  1. #1
    Join Date
    Sep 2008
    Posts
    49
    Plugin Contributions
    0

    Default Alignment on Attributes

    Hey,

    Im having some issues trying to control where my text and drop downs etc sit in regards to the element...

    its appearing to put them on the same line but horizontal alignment seems to be off...

    EG (dots represent space as pulls it to left align in here when i leave spacing!)

    ...........................[TEXT ENTRY BOX]
    Enter Name:


    ...........................[DROPDOWN BOX]
    Colour Preference:

    I have tried to play around with the settings but cant seem to get it to sit below or inline....

    any thoughts???

    Thanks!!

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

    Default Re: Alignment on Attributes

    A link to your site will make it easier to give specific advice.

  3. #3
    Join Date
    Sep 2008
    Posts
    49
    Plugin Contributions
    0

    Default Re: Alignment on Attributes

    Sorry!!

    ok so link is here..

    http://whitesflorist.co.uk/index.php...&products_id=1

    now i have played around with the css and added the following:

    Code:
    .wrapperAttribsOptions {
    	margin: 0.3em 0em;
    		line-height: 1.2em;
    	padding: 0.2em;
    	width: 16em;
    	}
    This works to an extent but drops the entry fields onto a new line.

    Thanks for your interest! :)

    I have removed the width field so you can see the effect i was getting! :)

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

    Default Re: Alignment on Attributes

    You have given a huge line-height which is causing the problem:
    Code:
    LABEL, h4.optionName {
    	line-height: 4.2em;
    	padding: 0.2em;
    	width: 16em;
    	}
    You can just eliminate this:
    Code:
    LABEL, h4.optionName {
    	padding: 0.2em;
    	width: 16em;
    	}
    If you want other labels to have this line-height, separate the selectors into two rules:
    Code:
    LABEL {
    	line-height: 4.2em;
    	padding: 0.2em;
    	width: 16em;
    	}
    
    h4.optionName label {
    	line-height: 1.2em;/*adjust to taste*/
    	padding: 0.2em;
    	width: 16em;
    	}

  5. #5
    Join Date
    Sep 2008
    Posts
    49
    Plugin Contributions
    0

    Default Re: Alignment on Attributes

    You are a scholar and a gentleman!! Splitting the two worked a treat for alignment!!

    Only issue now is this leaves the boxes next to the text - Any thoughts on getting all the boxes aligned on the vertical now??? :)

    The reason for the line height was to try to get the text to sit in the middle of teh menu graphics on left and right. Had to try to hack it and this method seemed to work.

    Thanks again for taking the time to help me on this one!! :)

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

    Default Re: Alignment on Attributes

    If you only wanted to alter the sidebox headings, you could use

    .leftBoxHeading label, .rightBoxHeading label { line-height: 4.2em;}

    so labels in other parts of your site are not affected (and there are many other labels, which may now look odd).

    For the box alignment, add a plain
    Code:
    h4.optionName {
    	width: 16em;
    	}
    and you can remove the width from the other rules.

  7. #7
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: Alignment on Attributes

    I didn't like the default layout for the attributes labels and input fields, and I hacked the file in template_default/templates:

    tpl_modules_attributes.php

    To give a line break after the Attribute Title and to put its input field below it.

    The ORIGINAL code looks like:-
    Code:
    <div class="wrapperAttribsOptions">
    <h4 class="optionName back"><?php echo $options_name[$i]; ?></h4>
    <div class="back"><?php echo "\n" . $options_menu[$i]; ?></div>
    <br class="clearBoth" />
    </div>

    My MODIFIED code looks like:-
    Code:
    <div class="wrapperAttribsOptions">
    <class="optionName back"><?php echo $options_name[$i]; ?><br />
    <div class="back"><?php echo "\n" . $options_menu[$i]; ?></div>
    <br class="clearBoth" />
    </div>
    After editing, I saved the file to my CUSTOM templates folder

 

 

Similar Threads

  1. v139h Attributes alignment
    By dank in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 1 Jun 2012, 03:43 PM
  2. Attributes Alignment/Size
    By dave_nextexit in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 6 Mar 2009, 08:30 PM
  3. Attributes on Product Pg. Alignment?
    By [email protected] in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 3 Feb 2007, 01:41 AM
  4. Attributes display alignment
    By Parafanaylya in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 8 Jul 2006, 07:07 PM
  5. Attributes display alignment
    By Parafanaylya in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 8 Jul 2006, 07:44 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