SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict hiddenpearls's Avatar
    Join Date
    Dec 2007
    Location
    Pakistan
    Posts
    262
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Styling drop down box, HTML FORM ELEMENTS

    I am a attaching 2 drop down boxes design and want to style them in XHTML/CSS. I am unable to do that. Searched a lot but couldn't find solution.

    Please help me to figure it out !

    Thanks
    Attached Files Attached Files

  2. #2
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    It's not possible to (consistently) style HTML form elements. Some browsers allow some aspects to be styles, but you can't depend on it, and really shouldn't do it, at it breaks conventions.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  3. #3
    SitePoint Addict hiddenpearls's Avatar
    Join Date
    Dec 2007
    Location
    Pakistan
    Posts
    262
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by C. Ankerstjerne View Post
    It's not possible to (consistently) style HTML form elements. Some browsers allow some aspects to be styles, but you can't depend on it, and really shouldn't do it, at it breaks conventions.
    But when clients send us the PSD and they have designed the form elements and want them same in XHTML/CSS. then how we can explain them.

    they want consistency in design rather than HTML form elements

  4. #4
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    You can simulate it using Javascript, Flash or Java Applets, none of which are particularly good solutions (though with a proper noscript fall-back, it could work).

    Depending on the client, you can either convince them that it's a bad idea to try to force something on the user, or you can try to make a fake solution with proper fall-back. The problem with faking the solution is that you will likely confuse all your advanced users, unless you go to great length to implement e.g. proper keyboard navigation and shortcuts (which differ from operating system to operating system).
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  5. #5
    SitePoint Addict hiddenpearls's Avatar
    Join Date
    Dec 2007
    Location
    Pakistan
    Posts
    262
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, you are right. there are some fake solutions available.

    I try to convince them but one of my client was not happy just because of this styling

    anyways, thanks for ur comments !


Tags for this Thread

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
  •