T
T
Timur Kalimullin2014-06-18 21:38:26
Mozilla
Timur Kalimullin, 2014-06-18 21:38:26

How to make styles work in Firefox with inherited width from table-cell ?

Hello,
for centering and scaling images on the site, a simple CSS class has been written to align them along:
1. vertical;
2. horizontal;
3. do not go beyond the boundaries of the parent.
I'm testing in Chrome, everything works.
I'm testing in Firefox, the image goes beyond the parent.
Link to demo: jsfiddle.net/ZetRider/7WBz7/3
It is also necessary to take into account that the image may be smaller in width than its parent.
What is the feature of Fierfox before this task?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Appp Zooo, 2014-06-18
@ikeagold

Replace max-width with width :

.t_m img {
    width: 100%;
}

Fiddle , and it will be the same everywhere :) (checked IE11 too) p.s. fi re fox

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question