cssinternet-explorercss-tablesquirks-mode

CSS Sprite Button Using Table... Can't get rid of line breaks after table in IE (quirks mode)


I am creating a css button using the following image...

css bg

This is the background of a table.. the text for the image goes inside td blocks.

You can see it in action here, please view source to see how it all works, css is in-lined.

css button link

Everything appears to be working great... but view it in IE and Firefox. You'll notice that for some reason there are line breaks in IE and not in Firefox. I want it to not have the line breaks, firefox style.

I know a lot of people will immediately say "Just add a DOCTYPE tag and all will be well!" Unfortunately my use case is such that it has to work in I.E. quirks mode.

So..with that being a restriction.. any ideas?


Solution

  • Did you try to add "float:left;" to css class ".spriteTableButton" ? This can solve the problem of linebreak in no time.