SitePoint Sponsor

User Tag List

Results 1 to 17 of 17
  1. #1
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Safari hates my site

    Hi, on my site I have #333333 input boxes with white writing. It works fine in all browser but in safari, the input box is white and it will not display the colour I tell it to. So when people type in they cannot see what they type.

    What's the best way to deal with this problem as I know Safari is popular for mac users.

    Thanks.

  2. #2
    SitePoint Wizard wonshikee's Avatar
    Join Date
    Jan 2007
    Posts
    1,223
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    That's not going to cause problems just in safari, google toolbar will change the background to a light yellow for auto fill stuff, so having white text is no good anyway.

  3. #3
    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)
    Since form elements are impossible to style consistently across different browsers, it's best to not style them at all.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  4. #4
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks.

  5. #5
    SitePoint Zealot
    Join Date
    Feb 2006
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We can't help with the problem if we don't see at the very least a sample of HTML and CSS code. If possible show us the web site where the problem occurs.

  6. #6
    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)
    Quote Originally Posted by wyrd33 View Post
    We can't help with the problem if we don't see at the very least a sample of HTML and CSS code. If possible show us the web site where the problem occurs.
    It wouldn't matter, since (as I wrote ), consistent cross-browser styling of forms is impossible.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  7. #7
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    style="width: 100%; background: #333333; font-family: Verdana; color: white; font-size: 11px;" 
    Browser-wise it seems to just be Safari but I haven't tested plugins yet. I do try and recommend my users to Firefox, but not everyone will.

    I can use some JS to change it for Safari users, but not sure if JS can check plugins??

    Thanks.

  8. #8
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To the best of my knowledge, Safari 3 doesn't have that problem Christian.

  9. #9
    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)
    TacMaf
    You can't rely on your users to jave Javascript enabled.

    Just don't style the form elements. It's non-standard behaviour anyway, and it makes it far more difficult to see for users who are visually impaired.

    Dan
    I didn't know that - but I still think my point above is valid.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  10. #10
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,355
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    If you set the input border to none or another color then this will allow the background to be styled in Safari 1.3+.

    http://www.pmob.co.uk/temp/safari-input-test.htm
    http://www.pmob.co.uk/temp/transparent-input.htm

    http://www.browsercam.com/public.aspx?proj_id=405563


    However as already mentioned above its not good to mess around with form elements

  11. #11
    SitePoint Zealot
    Join Date
    Feb 2006
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    With the exception of radio, checkbox, and file elements, I don't see why you can't style forms. Sure there are a few problems, but overall styling forms isn't that hard. Saying that we shouldn't style forms because of a little inconsistency seems a little silly to me.

  12. #12
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Select/Option can't be styled, wyrd33. Especially with the OPTION element being CDATA.

  13. #13
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,355
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by wyrd33
    Saying that we shouldn't style forms because of a little inconsistency seems a little silly to me.
    The argument is that form submission should be consistent across sites as it is very important that the user knows what to do. I have seen so many badly designed forms that I didn't have a clue where I was clicking and if indeed which areas were part of the form.

    The browsers makers used to consider form elements as part of their browsers appearance which is why few elements were stylable at all in safari.

    However I am not averse to adding a little color to the elements to make them fit in better with the scheme but I can quite understand both sides of the arguments and form styling is not an issue to tackle without some thought behind the process.

  14. #14
    SitePoint Zealot
    Join Date
    Feb 2006
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Schulz View Post
    Select/Option can't be styled, wyrd33. Especially with the OPTION element being CDATA.
    Okay, so that's 4 elements that can't be styled. But the comments here are using a broad generalization saying that you shouldn't style forms at all, even simple input boxes. A great portion of the forms out there are nothing more than input, textarea, and submit (such as contact forms and search forms).

  15. #15
    SitePoint Zealot
    Join Date
    Feb 2006
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The argument is that form submission should be consistent across sites as it is very important that the user knows what to do. I have seen so many badly designed forms that I didn't have a clue where I was clicking and if indeed which areas were part of the form.
    Bad designs are everywhere, and not just on forms. Some sites are so badly designed I can't even navigate through them. Does that mean we shouldn't be styling web sites and leave them plain markup, so all sites are consistent in appearance?

    I can certainly understand that certain form elements can't be styled, but I can't even remotely accept the argument of not styling elements because there are bad designers out there.

  16. #16
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,355
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by wyrd33
    but I can't even remotely accept the argument of not styling elements because there are bad designers out there.
    Pleas read my full comments in context as I clearly stated in the same post.
    I can quite understand both sides of the arguments and form styling is not an issue to tackle without some thought behind the process.
    Read Roger's in depth article that covers this subject exactly and take note of his conclusion.

  17. #17
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks people, and thanks very much Paul, you've been a great help.

    I like to style my forms to make them stand out and not follow other sites like a sheep.

    A sample of one of my forms is here: http://www.tacticalmafia.com/register.php

    I personally think as long as you clearly state each input section, there shouldn't be a problem with making your site different from others.

    Thanks.
    Last edited by TacMaf; Feb 5, 2008 at 17:12.


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
  •