After you’ve shortened your css, it’s time to get to know your css selectors. The following selectors are all in the css2.1 specifications and should work in all modern browsers (in case you’re wondering, Internet Explorer 6 is not a modern browser!). I haven’t covered the class and id selectors as I assume you’re already familiar with them. Continue reading »

 

Using Your Element Ids

A very simple feature to add to your web page is a link to content that isn’t currently visible. This can be very handy if your page is particularly long and you want to save your users from manually scrolling with their mouse. Continue reading »

 

Condense Your Code

If you’ve never looked into css shorthand before, now is the time to do so! Not only will it make your css easier to read and debug, it will result in smaller css files meaning faster page loading times for your sites’ visitors. Continue reading »

 

This is possibly the shortest post in history but worthwhile nonetheless.

Before you start your css for a page/site, bung this right at the top of your stylesheet.

* {
    margin:0;
    padding:0;
}

Browsers have default paddings and margins for different elements in your html. The css above removes these defaults from all elements by using the universal selector (*) which means that you start with a level playing field across browsers.

 

What are CSS hacks?

A CSS hack is a way to use the browsers incorrect implementation of CSS to your benefit. Different browsers have different ways of interpreting combinations of css rules and selectors. Although it’s preferable to use conditional comments wherever possible, there are definitely times when a quick css hack is ideal. For example, if I have just one rule that needs overriding for IE, I will use a hack simply because its quicker and involves less messing about. Our time is valuable after all!

Continue reading »

 

It is common practice for websites to have a ‘skip navigation’ link at the top of each page. This can be a huge benefit for people using your site with text browsers/screen readers or visitors with poor motor skills.

However, you might not want to display this link for other users. The easiest way to get round this and still keep the link accessible is to hide it off screen using CSS and make it visible when it is brought into focus with the keyboard. By using this method, everybody who needs to can still access the ‘skip navigation’ link.
Continue reading »

© 2012 ElanManSuffusion theme by Sayontan Sinha

Page optimized by WP Minify WordPress Plugin