I am currently working on creating a gallery section that includes captions using the figure
and figcaption
elements. This gallery must be responsive and adapt to varying heights and widths along with their corresponding captions.
While everything is functioning correctly in firefox
, I am facing an issue with chrome
not adhering to the 100% width specified in the CSS
, which is crucial for the layout.
figure {
margin: 6px;
color: #333;
display: inline-block;
-webkit-box-sizing: border-box ;
-moz-box-sizing: border-box ;
box-sizing: border-box ;
}
figure figcaption {
background: #E3E3E3;
padding: 10px 12px 12px;
color: #333;
text-align: center;
font-size: 13px;
width: 100%;
display: table-caption;
caption-side: bottom;
-webkit-box-sizing: border-box ;
-moz-box-sizing: border-box ;
box-sizing: border-box ;
}
For reference, here is the link to my JSFiddle
I would greatly appreciate any assistance in resolving this issue.