Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9

Thread: CSS & JQUERY

  1. #1
    Senior Member kirman's Avatar
    Join Date
    May 2003
    Location
    UK England
    Posts
    765
    Member #
    1499
    Liked
    2 times
    Ive got a simple jquery form, im not sure how to reposition the error messages that appear in red. Its driving me nuts as id like them to be next to the actual text stating what goes in the form. Rather than it going underneith and stretching the whole div lol

    any help greatly appreciated.
    Dream like you'll live forever. Live like you're gonna die 2morrow!

  2.  

  3. #2
    Senior Member kirman's Avatar
    Join Date
    May 2003
    Location
    UK England
    Posts
    765
    Member #
    1499
    Liked
    2 times
    Code:
                } else {
                    // create label
                    label = $("<" + this.settings.errorElement + "/>")
                        .attr({"for":  this.idOrName(element), generated: true})
                        .addClass(this.settings.errorClass)
                        .html(message || "");
                    if ( this.settings.wrapper ) {
                        // make sure the element is visible, even in IE
                        // actually showing the wrapped element is handled elsewhere
                        label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();
                    }
                    if ( !this.labelContainer.append(label).length ) {
                        if ( this.settings.errorPlacement ) {
                            this.settings.errorPlacement(label, $(element) );
                        } else {
                        label.insertBefore(element);
                        }
                    }
                }
    Where it says insert before i was going to change it to this..

    label.prependTo('#error');

    but it didnt work even though id given the text the same id...

    any help please
    Dream like you'll live forever. Live like you're gonna die 2morrow!

  4. #3
    Senior Member kirman's Avatar
    Join Date
    May 2003
    Location
    UK England
    Posts
    765
    Member #
    1499
    Liked
    2 times
    anyone?
    Dream like you'll live forever. Live like you're gonna die 2morrow!

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    If #error is a div, set display: inline; in the CSS.

    Other than that, we'd have to see the form. Even then, you're probably not going to find too much help. There aren't a lot of people that do things like this, and you're asking on a weekend.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    Senior Member kirman's Avatar
    Join Date
    May 2003
    Location
    UK England
    Posts
    765
    Member #
    1499
    Liked
    2 times
    http://connordesign.comyr.com/testform.html thats a test one i have put up...

    i need to be able to change its css properties and tell them where to position themselfs...

    cheers...
    Dream like you'll live forever. Live like you're gonna die 2morrow!

  7. #6
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Here's how you handle this issue...

    1) Get rid of the line breaks in your form.
    2) Add this to your CSS: input, textarea {display: block;}
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  8. #7
    Senior Member kirman's Avatar
    Join Date
    May 2003
    Location
    UK England
    Posts
    765
    Member #
    1499
    Liked
    2 times
    I have removed the line breaks, and also removed the DIV's that i didnt need.

    I added this
    input {display:block;}
    textarea {display:block;}

    and it still does it :banghead:

    even if i remove the style is still does this.

    any more help is greatly appreciated. cheers
    Dream like you'll live forever. Live like you're gonna die 2morrow!

  9. #8
    Senior Member kirman's Avatar
    Join Date
    May 2003
    Location
    UK England
    Posts
    765
    Member #
    1499
    Liked
    2 times
    To add to what i wrote above... I've changed the form properties so i can have the message display underneith the form elements. However when it appears it still shifts everything down. it's now at this location...

    http://connordesign.comyr.com/1.html
    Dream like you'll live forever. Live like you're gonna die 2morrow!

  10. #9
    Senior Member kirman's Avatar
    Join Date
    May 2003
    Location
    UK England
    Posts
    765
    Member #
    1499
    Liked
    2 times
    Dont panic, i fixed it. I changed some jquery and put the error into a DIV and set height and width... Thank you
    Dream like you'll live forever. Live like you're gonna die 2morrow!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:03 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com