Ultimate Web Tips

your Wordpress, jQuery, PHP, MySQL, Linux and CSS guide to a successful website
Read more:
Archive for the ‘CSS’ Category

September 11th, 2012

IE only stylesheet and hacks

No Comments, CSS, HTML, by Joakim Ling.

As a web developer one of our biggest challenges is to make web design look the same or at least similar for all browsers. Most of the browsers renders almost identical but we have one mind bugging little nasty thing called Internet Explorer, we can’t ignore this browser as it is the standard browser in Windows so it has a lot of users and of course Microsoft made extra hard for us so that every version has its own life. There are a few ways to tackle this thing, most common once are with conditional tags or CSS hacks.

I’ve noticed that when you use display inline-block on li elements it creates a space between them. Even if you put margin and padding to 0. Took me a while to figure it out but the reason is that li is a whitespace independent method so if you have your elements on diffrent rows and renders a space between them.

February 13th, 2012

Style HTML5 placeholder color with CSS

No Comments, CSS, by Joakim Ling.

For now this is only possible in Webkit and Mozilla browsers, the discussion about best implementation is still an ongoing project. You’ll have to use 2 rules, as the standards for this is not been set yet.

October 17th, 2011

Multiple backgrounds with CSS3

No Comments, CSS, by Joakim Ling.

One of many great features in CSS3 is the multiple background support in one single element. Web designers can now define as many layers as they want, with a simple comma separated list.

August 19th, 2011

Cross browser border radius even for IE

No Comments, CSS, by Joakim Ling.

Rounded corners is something new in CSS3, therefore we have some compatibility issues especially with Internet Explorer up to version 8. But of course there are ways around so you don’t have to use images everywhere you want a round corner.

July 26th, 2011

Create a cross-browser CSS 3 gradient

No Comments, CSS, by Joakim Ling.

CSS gradient was introduced by Webkit around 2007 but was rarely used due to cross-browser issues. But nowadays when most browsers support it, it is common used to save up on http requests on your site. Firefox started supporting gradient in 3.6 which made it a lot more popular on the web to be used by web designers.

March 8th, 2011

How to set the opacity of an element

No Comments, CSS, by Joakim Ling.

To set opacity in CSS is easy and supported by all new browsers. This makes a nice effect and you don’t have to work with images.