LEXIPIXEL, more than just a palindrome!
• Web Designer • Web Developer • Volusion • OSCommerce • WordPress Blog • Themes • Photoshop • .PSD • Templates • Logo Design • CSS • CMS • eCommerce • Online Stores • Shopping Cart • Merchant Account • Hosting • Search Engine Marketing (SEM) • Search Engine Optimization (SEO) • Solutions! • Training & Support

March 21, 2009

Capitalize Text with CSS

Filed under: Fun with CSS
Randy Harris @ 12:52 pm

To capitalize a string of text using CSS you can use an inline style tag, e.g.-

<div style="text-transform:capitalize;">
this was typed in lower case and capitalized with css
</div>

To create a (reusable) class, add the following to your style sheet (.css) file;

.captxt { text-transform:capitalize; }

then use the following in your HTML;

<div class="captxt">
this was typed in lower case and capitalized with css
</div>

In addition to capitalize, you can also use CSS to transform text strings to upper case or lower case, e.g.-

.uctxt { text-transform:uppercase; }

or-

.lctxt { text-transform:lowercase; }

###








Home | Site Map | Links | Email Us

• eCommerce Websites • Shopping Carts • Online Stores •
• Web Design • Photoshop • Logo Design • Custom Programming •
• SEO • SEM • PPC • Display Ads • Solutions! •

Contact: Randy Harris (508) 371-8822
Framingham, MA (USA)

Copyright ©2012 LEXIPIXEL.COM, all rights reserved.
WordPress v.3.3.2 blog designed by LEXIPIXEL