Opera OL bad text align with justify

2019-05-31 09:59发布

I'm having a problem with justify alignment of list items (<li>) in an ordered list (<ol>) in Opera. There are different spacings in front of the lines.

Opera version:

  • Version: 11.62
  • Build: 1347
  • Platform: Win32
  • System: Windows 7

Screenshots:

Opera 11.62 (Build 1347), Windows 7 - ordered list indentation problem

Opera 11.62 (Build 1347), Windows 7 - ordered list indentation problem (reproduced at jsfiddle.com)

Test code: http://jsfiddle.net/ySmJZ/

ol {
  list-style: decimal;
  margin: 16px 0px;
  padding: 0px 0px 0px 40px;
  text-align: justify;
}

2条回答
Explosion°爆炸
2楼-- · 2019-05-31 10:25

It's a known bug in Opera (CORE-41499). There isn't really a workaround, except to avoid using text-align:justify.

查看更多
一夜七次
3楼-- · 2019-05-31 10:27

Yes, this is a known bug in Opera (even in 12.01 (x86)), but there IS a workaround, written by deathshadow here:
http://my.opera.com/community/forums/topic.dml?id=1424852&t=1347118644&page=1#comment12696422

Citing:

"One workaround (until/if they fix it) is an extra SPAN or DIV inside the LI wrapping all the content set to display:inline-block; vertical-align:top;"

I tried it, and it really works (at least in Opera 12.01 (x86)):

http://jsfiddle.net/Sk8erPeter/ySmJZ/10/

BEFORE

Opera bug with ordered lists (<ol>) and text-align:justify;

AFTER

Opera bug with ordered lists (<ol>) and text-align:justify; WORKAROUND

查看更多
登录 后发表回答