问题
I have installed superfish module in joomla 1.5 . I have a problem in IE 6,7 . the width of 'li' elements are not calculated correct and this causes some items fall down. unfortunately I am working on my pc and cann't uploaded it somewhere to show you the site, but I hope maybe it is a common problem and someone can help me.
How can I resolve it?
回答1:
Common reasons why you might get width issues in IE6:
- Quirks mode: Number one cause of layout glitches in IE. Make sure your
<!DOCTYPE>
is set correctly. - The floated margin bug: If you're using
float
in your CSS and those elements also havemargin
, you may find your margins getting doubled. The best work around for this is to usepadding
orborder
instead ofmargin
. You may have to adjust your layout to deal with it. max-width
andmin-width
not supported: IE6 simply doesn't support these CSS features. It will break your layout. Not much you can do about it.- Floats with spaces between them: In some cases, floated elements may appear a few pixels further apart in IE6 than other browsers. IE is inserting spaces between them because it's in the HTML code (maybe they're on separate lines of code?). Remove the spaces and IE will render it correctly.
- One of the
has-layout
bugs: IE has an internal flag calledhas-layout
that has a number of rendering bugs associated with it. You can't set this flag manually; IE decides what it should be based on the other properties of the element. You can sometimes work around it by settingzoom:0;
in the stylesheet for the element. But not always.
Further reading: http://www.virtuosimedia.com/dev/css/ultimate-ie6-cheatsheet-how-to-fix-25-internet-explorer-6-bugs
来源:https://stackoverflow.com/questions/10362261/superfish-items-width-arent-correct-in-ie-6-7