SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: CSS Form Issue

  1. #1
    SitePoint Zealot allanlud's Avatar
    Join Date
    Jul 2012
    Location
    Meath, Ireland
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS Form Issue

    Hi all, just have a small problem with the textarea of a form, I've seen it quite a lot on other websites. The problem I have is when the textarea is resized, it drops below the label, anyone know how I can resolve this issue.

    Screenshots attached.

    Thanks.
    Al.
    Attached Images Attached Images

  2. #2
    SitePoint Zealot
    Join Date
    Jul 2012
    Location
    Scarborough, North Yorkshire, United Kingdom
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tricky to see without a link but has the form got a fixed width and are the labels and fields floated to the left?

    If they are, try making the form container wider
    Richard
    Resell SSL Certificates - API / WHMCS / HostBill / ClientExec
    ServerTastic - RapidSSL, Geotrust, Thawte, Symantec, SmarterTools and more

  3. #3
    SitePoint Zealot allanlud's Avatar
    Join Date
    Jul 2012
    Location
    Meath, Ireland
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry don't have a link right now, it's just a .html file on my PC.

    The form has got a fixed width and labels and fields are floated to the left.

    I can post the code if that's any help?

  4. #4
    Community Advisor silver trophybronze trophy
    dresden_phoenix's Avatar
    Join Date
    Jun 2008
    Location
    Madison, WI
    Posts
    2,801
    Mentioned
    34 Post(s)
    Tagged
    2 Thread(s)
    I'd suggest : textarea { resize:vertical; max-width: width of your input in px; min-width: width of your input in px;}

    resize:vertical; will allow the text area to be resized vertically but not horizontally. the rest is just for good measure!
    Hope that helps

  5. #5
    SitePoint Zealot allanlud's Avatar
    Join Date
    Jul 2012
    Location
    Meath, Ireland
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yup, perfect, sounds like it should work, don't think I ever remember doing a vertical resize before, thanks.

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,198
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by allanlud View Post
    Sorry don't have a link right now, it's just a .html file on my PC.
    But there is some CSS, too ... and this is a CSS forum.

    If there's a fixed width on the form, it's odd that the textarea would drop. You should probably warp a div around the label and input anyway, so perhaps give that a fixed width too. But for more help, post your HTML and CSS so we can test it.

    "resize" only works on some newer browsers.


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
  •