Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2008
    Location
    Toronto
    Posts
    347
    Plugin Contributions
    0

    Default How to Align and resize input boxes?

    Hello all,

    I have a series of 7-10 attribute input boxes. They are currently different lengths and not aligned vertically. Is there a simple way to make them all the same length and align them vertically?

    Any help is greatly appreciated.
    Thank you.

  2. #2
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: How to Align and resize input boxes

    A URL would help here....

    But off the top of my head.

    They are not aligned because the option names are not the same length. You can set the width of the option names with a css rule added to the bottom of the stylesheet something like:

    Code:
    .optionName{width:150px;}
    change the 150px to suit your site.

    I am surprised that the inputs are different lengths. What sort of inputs are they. Gosh a URL would help

  3. #3
    Join Date
    Dec 2008
    Location
    Toronto
    Posts
    347
    Plugin Contributions
    0

    Default Re: How to Align and resize input boxes

    Quote Originally Posted by niccol View Post
    A URL would help here....

    But off the top of my head.

    They are not aligned because the option names are not the same length. You can set the width of the option names with a css rule added to the bottom of the stylesheet something like:

    Code:
    .optionName{width:150px;}
    change the 150px to suit your site.

    I am surprised that the inputs are different lengths. What sort of inputs are they. Gosh a URL would help
    Sorry about that Niccol!

    Here's an URL.

    http://www.kcbgraphics.com/index.php...products_id=12

    I have tried .optionName bit it doesn't seem to effect the length of the input box, only the space after the Option Name before the input box starts.

    I'm using ZC 1.3.8
    PHP5.2.9
    MySql 5.0.81

  4. #4
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: How to Align and resize input boxes?

    Well optionname does exactly what you have discovered.

    By default the select dropdown type menus are rendered just big enough to fit the contents. To change this you could add:

    Code:
    #productAttributes select{width:300px}

  5. #5
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: How to Align and resize input boxes?

    A good resource for looking at how browsers render the <input type="file"> is:

    http://www.456bereastreet.com/lab/st...d/file-select/

    Maybe someone else has some good advice here?

  6. #6
    Join Date
    Dec 2008
    Location
    Toronto
    Posts
    347
    Plugin Contributions
    0

    Default Re: How to Align and resize input boxes?

    Quote Originally Posted by niccol View Post
    Well optionname does exactly what you have discovered.

    By default the select dropdown type menus are rendered just big enough to fit the contents. To change this you could add:

    Code:
    #productAttributes select{width:300px}
    Thanks Nick!

    That works with well with the attributes that have a drop down of choices but not for a text or upload attribute.
    You can see it in the link I provided earlier.
    Any ideas on these two??
    Sorry for my ignorance on this!!

  7. #7
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: How to Align and resize input boxes?

    Well the text input should be no problem. It will be something like:
    Code:
    #productAttributes input{width:300px}
    but I can't find one of those on your site. but maybe I am missing it.

    The "input type=file" which produce the upload boxes are notorously difficult to style. That is what the link I sent you is about. I thought I had talked about this but when I re-read my posts I realise I haven't (going mad)

    Browsers are very uneven about how they display these fields. Applying styles is fairly random in my experience.

    Not a perfect answer I am afraid but maybe someone out there has better advice??

  8. #8
    Join Date
    Dec 2008
    Location
    Toronto
    Posts
    347
    Plugin Contributions
    0

    Default Re: How to Align and resize input boxes?

    Quote Originally Posted by niccol View Post
    Well the text input should be no problem. It will be something like:
    Code:
    #productAttributes input{width:300px}
    but I can't find one of those on your site. but maybe I am missing it.

    The "input type=file" which produce the upload boxes are notorously difficult to style. That is what the link I sent you is about. I thought I had talked about this but when I re-read my posts I realise I haven't (going mad)

    Browsers are very uneven about how they display these fields. Applying styles is fairly random in my experience.

    Not a perfect answer I am afraid but maybe someone out there has better advice??
    Thanks Nick! I appreciate your help.

 

 

Similar Threads

  1. Contact us page - input fields how to align?
    By ekele in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 2 Jan 2011, 01:25 PM
  2. Product Boxes : how to align text next to image ?
    By Nipcom in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 19 Jan 2010, 07:43 AM
  3. Resize Login input fields
    By thornhillguy in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 23 Oct 2009, 02:41 AM
  4. How to change light blue in input boxes
    By audleman in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 27 Sep 2007, 09:29 PM
  5. Align and Size Input Boxes
    By jacque427 in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 1 Mar 2007, 05:55 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