Entries Comments

Alex Mace’s Blog

Life & Web Development

Posts Tagged ‘CSS’

Styling buttons in Firefox

This is more of a note to remind me in future. Take this bit of HTML:

<button><span>Save</span></button>

If you set the button and the span to have padding: 0, Firefox will still show the button with some padding. You can get rid of this with the following CSS:

button::-moz-focus-inner {
    border: 0;
    padding: 0;
}

Sorted!
 
 

CSS Doesn’t Bug Me

John C. Dvorak has written in his PC Magazine column (found via hicksdesign) that CSS is fundamentally broken. This is so far from the truth I can’t believe it’s actually been written in an actual magazine. Although the columnists task is sometimes to provoke you into think about things, so writing it in the first place is fair enough.

Apart from a failure to grasp exactly how CSS works (huh, maybe that’s why you’ve struggled in redesigning your blog John?) he highlights what I consider to be a major problem with the majority of people who work with CSS, rather than CSS itself. John complains that each browser’s implementation of CSS is different, and that

“There actually are Web sites that mock this mess by showing the simplest CSS code and the differing results from the three main browsers and the Safari and Linux browsers. The differences are not trivial. And because of the architecture of this dog, the bugs cascade when they are part of a larger style sheet, amplifying problems. Worse yet, nobody except the most techie insiders wants to talk about this mess.”

(more…)