简体   繁体   中英

HTML Image tags in Tab Content not rendering

I'm trying to design a HTML div of class type nav-tabs with tab-contents as images but the images are not rendering within the <div class="tab-content"></div>

But works outside the <div class="tab-content"></div> . I'm not able to figure why this is happening.

Preview of UI 衬衫表
(source: toile-libre.org )

File Structure

档案结构
(source: toile-libre.org )

This is the HTML Syntax

<div class="col-md-6" id="chart">
                <div class="col-md-12 selectboxit-container tshirt-chart-div">
                    <ul class="nav nav-pills" role="tablist">
                        <li role="presentation" class="active"><a href="#quote">Size Chart</a></li>
                        <li role="presentation" class="dropdown"> <a href="#" class="dropdown-toggle" id="drop4" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> Product Type <span class="caret"></span> </a>
                            <ul class="dropdown-menu" id="menu1" aria-labelledby="drop4">
                                <li onclick="renderChart('roundNeck')"><a id="roundNeck" href="#quote">Round Neck T-Shirt</a></li>
                                <li onclick="renderChart('collarNeck')"><a id="collarNeck" href="#quote">Collar Shirt</a></li>
                                <li onclick="renderChart('hoodie')"><a id="hoodie" href="#quote">Hoddie</a></li>
                                <li onclick="renderChart('roundNeck')"><a id="hoodieZipper" href="#quote">Hoddie Zipper</a></li>
                            </ul>
                    </ul>
                    <div id="gender" class="btn-group" role="group">
                        <button type="radio" class="btn btn-default" name="gender" value="0">Male</button>
                        <button type="radio" class="btn btn-default" name="gender" value="1">Female</button>
                    </div>
                </div>
                <div class="col-md-12 bs-example">
                    <ul class="nav nav-tabs">
                        <li class="active"><a data-toggle="tab" href="#small">S</a></li>
                        <li><a data-toggle="tab" href="#medium">M</a></li>
                        <li><a data-toggle="tab" href="#large">L</a></li>
                        <li><a data-toggle="tab" href="#xlarge">XL</a></li>
                        <li><a data-toggle="tab" href="#xxlarge">XXL</a></li>
                    </ul>
                    <div class="tab-content">
                        <div id="small" class="tab-pane fade in active"><img id="cs" src="./img/chart/round-boy-s.jpg"></div>
                        <div id="medium" class="tab-pane fade"><img id="cm" src="./img/chart/round-boy-m.jpg"></div>
                        <div id="large" class="tab-pane fade "><img id="cl" src="./img/chart/round-boy-l.jpg"></div>
                        <div id="xlarge" class="tab-pane fade"><img id="cxl" src="./img/chart/round-boy-xl.jpg"></div>
                        <div id="xxlarge" class="tab-pane fade"><img id="cxxl" src="./img/chart/round-boy-xxl.jpg"></div>
                    </div>
                </div>
            </div>

The issue was with CSS I had defined
.tab-content>.tab-pane { display: none; }

After removing it the images are rendering

结果

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM