Results 1 to 6 of 6

Thread: jQuery Form Wizard styling

  1. #1
    Join Date
    Oct 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default jQuery Form Wizard styling

    1) Script Title: jQuery Form Wizard

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...formwizard.htm

    3) Describe problem: On IE7 (yeah I know) the text for each form element (e.g Address #2) seems to get constrained. It appears as though it wraps around the moment a space is put in. On the DD site this can be seen on step 2 of the first demo. It does appear okay on IE8 and FF. I just can't see anything in the css that would cause this? Should I just not worry?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If you mean that the Next 'button' (it's really a span) is wrapped to the next line, I'd try changing this line in the script:

    Code:
    			var $paginatediv=$('<div class="formpaginate" style="overflow:hidden;"><span class="prev" style="float:left">Back</span> <span class="status">Step 1 of </span> <span class="next" style="float:right">Next</span></div>')
    to:

    Code:
    			var $paginatediv=$('<div class="formpaginate" style="overflow:hidden;"><span class="next" style="float:right">Next</span> <span class="status">Step 1 of </span> <span class="prev" style="float:left">Back</span></div>')
    What it does is reverse the order of the two floated spans (Next and Back). Though counterintuitive, because they are floated this shouldn't change the order in which they appear on the page. And doing it this way has a very good chance at fixing the issue. It does in ordinary markup, so should here. Other browsers that already do this right shouldn't be affected.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Oct 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    John,

    Thanks but that's not what I meant - sorry I shouldn't have used the word "element"! What I mean is the actual free text prior to the form element. e.g. on the dome on DD if you look at step 2 it shows;

    Address
    #1

    When it should be

    Address #1

    Code:
    Address #1:<br /> <input id="addr1" type="text" size="35" /><br />
    as there is no line wrap before the # in the html but it is wrapped on the page.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I see. What I said about the other matter is still probably valid. For this you can, since it's hard coded use:

    Code:
    Address&nbsp;#1:<br /> <input id="addr1" type="text" size="35" /><br />
    Or put inline style or in the stylesheet, style for the fieldset (example inline):

    Code:
    <fieldset style="white-space: nowrap;" class="sectionwrap">
    <legend>Shipping Address</legend>
    Country:<br /> <input id="country" type="text" size="35" /><br />
    State/Province:<br /> <input id="state" type="text" size="35" /><br />
    Address #1:<br /> <input id="addr1" type="text" size="35" /><br />
    Address #2:<br /> <input id="addr2" type="text" size="35" /><br />
    </fieldset>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Oct 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    John,

    Brilliant. Non breaking spaces solved the problem for my implementation. So simple yet so far from where I was thinking! Thank you!

  6. #6
    Join Date
    May 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for the solution; I signed up for this very problem!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •