CSS

Articles from this section are focused on CSS. You will find tips, tricks and useful information about development using CSS stylesheets.

CSS opacity

Opacity is a really cool and very easy to achieve effect in CSS. In this article I will describe how to set opacity of any HTML element using smart but not standard for CSS 2.1 property.

Code below shows how to correctly set opacity of any HTML element:

Preview Code
Opacity Example
#myOpacityImage { 
  opacity:.5; 
  filter: alpha(opacity = 50);
}

Nifty one-line IE6 CSS hack

Sometimes if there is no other way to fix UI issue we are forced to use CSS hacks. Even though they are not valid from W3C point of view, they simple do the job and save plenty of time.

In this article I will present my favourite CSS hack where we can specifically target IE6 or IE7 or any other browser.

CSS cellspacing and cellpadding

So you have created table and now you are wondering how can you set cellspacing or cellpadding from CSS? Luckily for us, CSS supports this functionality indeed, but name of the CSS properties are not that obvious and sometimes they are causing a bit of headache.

IE6 png transparency fix

What is PNG?

PNG stands for 'Portable Network Graphics' and next to the GIF and JPEG is one of the most popular graphic file formats used today.

PNG offers lossless data compression - graphics saved in PNG format don't lose their quality. This fact is extremely important for all web-designers, because no one wants their graphics look fuzzy when extracted from Photoshop. However, the best thing about PNG files is their support for transparency including alpha channel (the percentage value of transparency).

Syndicate content