Mr eel
Either the Software is Broken…
Or you don’t know how to code CSS properly. Just a little while back I read this criticism of Firefox. In it the author claims that Firefox doesn’t allow you to set the width on an anchor tag.
*sigh* Here’s a tip. Go and buy a nice book about CSS. CSS - The Definitive Guide is a good one. Now once you’ve read that fine book, armed with your new knowledge of CSS, you will now realise the Firefox doesn’t support widths on anchor tags because they are inline elements. You can’t put widths on inline elements. This is the expected behavior per the CSS specifications. An inline element is one that just flows around other elements in the page. A paragraph tag is a good example of an inline element. Contrast this with a block element. A block element is a bossy little so-and-so. It doesn’t flow around other elements, but want to take up as much room horizontally as it can. You can set widths on block elements.
Long story short; in order to set a width on an anchor you need to either set it to behave as a block element or float it.
Like this:
a {
display:block;
width:4em;
}
Or if you’d rather float it:
a {
float:left;
width:4em;
}
So simple! The problem here isn’t Firefox. It’s using CSS without understanding how it works. That’s cool, we’ve all gotta start somewhere. However when you start bagging software without actually knowing what you’re talking about… I say bollocks!
Comments