Reputation: 159
I have this table with some content displayed with flexbox working fine in Chrome but not in Mozilla. The thing is that if I put the content out of the table it works but not if is inside. When you resize it looks like the green div has a min-width (Mozilla).
JSFiddle and the code:
.s_container {
margin: auto;
width: 100%;
height: 100%;
border-spacing: 0px;
overflow: hidden;
border: none;
display: -webkit-flex;
display: -webkit-box;
display: -moz-flex;
display: -moz-box;
display: flex;
display: -ms-flexbox;
}
.ssm_opcion {
overflow: hidden;
position: inherit;
background: yellow;
}
.ssm_opcion img {
vertical-align: middle;
width: auto;
max-width: 100%;
height: auto;
}
#text_opcion {
width: 100%;
display: -webkit-flex;
display: -webkit-box;
display: -moz-flex;
display: -moz-box;
display: flex;
display: -ms-flexbox;
-webkit-box-flex: 1;
-moz-box-flex: auto;
-webkit-flex: auto;
-ms-flex: auto;
flex: auto;
background: green;
}
.test {
width: 100%;
}
.ti-ar-d {
justify-content: flex-end;
/*-- horizontal --*/
align-items: flex-start;
/*-- vertical --*/
-webkit-justify-content: flex-end;
/*-- horizontal --*/
-webkit-align-items: flex-start;
/*-- vertical --*/
-webkit-box-pack: end;
/*-- horizontal --*/
-webkit-box-align: start;
/*-- vertical --*/
text-align: right;
}
<table class="test">
<tr>
<td>
<div class="s_container">
<div id="text_opcion" class="ti-me-d">
<label for="test">
<p>Prueba</p>
</label>
</div>
<div class="ssm_opcion">
<center>
<img src="images/opciones/mostaza.png">
</center>
</div>
</div>
</td>
</tr>
</table>
Upvotes: 0
Views: 225
Reputation: 68810
This is not related to flexbox, but to the use of a <table>
.
You need to add this rule, to avoid your image to break the table layout:
.test {
table-layout: fixed;
}
Upvotes: 2