Simon Baynes: Web Development

Some CSS Tips

Now I don't profess to be a legend of CSS, but I get by. Two things that really used to bug me when I was doing layouts with CSS were the base margins and padding around HTML elements like <form>, <ul>, <h1> and <p> are never constant on different browsers. Secondly, it is the purple border that IE puts around an image that is a link by default. Here is some quick CSS to set all your padding and margins to zero and prevent all borders on images.

* {
    padding: 0;
    margin: 0;

img {
    border: 0;

There are now all defaulted and be overridden for individual elements.

By Simon Baynes