Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2008
    Posts
    71
    Thanks
    7
    Thanked 3 Times in 3 Posts

    css or php capitalization

    Does it matter if i capitalize data with css(text-transform:capitalize) or php(ucwords())?
    I know this may seem like a over exaggerated question, but i was thinking in context of other scenarios.

    If there is a situation where you could solve the problem with php and css(whatever that may be), which should you use?

    Does one load slower?
    What is better/recommended?
    Its not static content that I am capitalizing, its header information.
    If i was of any help, dont forget to click the 'thank' button =]

  • #2
    New Coder
    Join Date
    Aug 2010
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't think it matters much, but as it seems like a stylistic preference, I'd use CSS to text-transform:uppercase;

    Seems like getting in the practice of parsing strings is not only more code, but wouldn't work on PHP-incapable servers.

  • #3
    Regular Coder
    Join Date
    Jul 2010
    Location
    St George, UT
    Posts
    138
    Thanks
    6
    Thanked 17 Times in 17 Posts
    I would personally do it with CSS. Not a huge deal, but it doesn't really make sense to style text before it gets to the browser.


  •  

    Posting Permissions

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