View Full Version : css or php capitalization

08-17-2010, 02:13 AM
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.

08-17-2010, 03:30 AM
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.

08-17-2010, 04:55 AM
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.