Custom implementation -moz-max-content

I have ul and I want to fix ul width for content. I am currently using -moz-max-content , but there is some problem in browsers other than mozilla.

How can I implement -moz-max-content ?

+4
source share
1 answer

Use max-width: intrinsic; . This works for webkit browsers (Chrome and Safari).

Remember that attributes starting with -moz only work in Mozilla Firefox. Common prefixes:

  • -moz for Firefox
  • -webkit for -webkit (mostly Chrome and Safari and lots of chrome forks)
  • -ms for IE10
  • -o for Opera

As written at http://msdn.microsoft.com/library/ms530811.aspx , you can only define pixels or percentages. The max-width property is supported with IE7.

Perhaps you can use max-width: 100%; for IE, but I'm not sure the results are the same.

+9
source

Source: https://habr.com/ru/post/1416366/


All Articles