5 Useful CSS Tips and Tricks You Should Know

“You can never have too much of a good thing–and two good things we rely on in our work are tips and tricks.”

William Craig, President of WebFX Inc.

As time passes Cascading Style Sheets (CSS) offers more opportunities to make better websites with its ever growing advancements. CSS can get tricky, but that doesn’t mean that you can’t learn more tips and tricks to help you.

Lets look at some CSS tips and tricks to help you create better visually looking sites and improve your CSS skills:

1.Resize Images With Ease

Use max-width to help with stubborn images that needs to be a specific width size. This makes it so that the image could never surpass the max width you entered.

2.Create An Area Where Text isn’t Allowed To Touch the Image

Use max-width to help with stubborn images that needs to be a specific width size. This makes it so that the image could never surpass the max width you entered.

3.Avoid Using Inline Code

By doing this, it will make it easier to maintain your page and also takes advantage of browser caching. This also prevents you from having an enormous headache for when you go and write a proper cascading style sheet, and your properties aren’t applying correctly. An example of inline code is shown to the right.

4.Correctly Pick Classes and IDs

When picking a class/ID name, try picking something relatively short, but at the same time, descriptive. Picking a name that is too long can make it difficult to read. Picking a name that is too short can make it cryptic and confuse you in the future.

5.Text Transform

Use the text-transform property to make sure specific blocks of text are uppercase, lowercase, and etc..

Leave a comment

Design a site like this with WordPress.com
Get started