Web Design Blog - March 11, 2010

RGBA

What is RGBA? I'm glad you asked. As CSS3 becomes more widely supported RGBA will become one of those attributes that you just cant live without. Why? Well first it is just cool. Second it eliminates those semitransparent png slices you have to make to create a that glass or screen effect over backgrounds. How does it work? Simple "R"= Red "G"= Green "B"= Blue and the tricky one "A"= Alpha. Put that together and you get "background: rgba(22, 120, 10, .25); ... read more!

Posted in technology | Post Comment

jquery - getting those pesky dropdown values

If you have coded javascript before, you will know that getting a selected option value from a dropdown is a couple tedious extra steps more than getting a value from a text field. With jquery, no more will you need to treat these two fields differently. If you need the value of a dropdown that has an id of "the_dropdown" you can write a quick jquery call to get it very easily: $('#the_dropdown').val() That's it! It is just that simple. ... read more!

Posted in javascript | Post Comment

PHP substring without breaking a word

A while back I explained how you can use php substr function to truncate some text for a preview of a full listing. That method will cut your text right at 250 characters which may leave you with a word cut off right in the middle. Today I am going to show you a simple function that will keep all your words in tact but still allow you to shorten for preview. The simple algorithm is as follows: Is the string longer than our limit ( in this case 250 ) Truncate the string to our limit If we ended ... read more!

Posted in php | Post Comment


View All Posts
web design corner image