如何使用flexbox?
#cssmenu ul {
display: flex;
flex-wrap: wrap;
}
#cssmenu ul li {
flex: 1 0 25%;
}
<style>
\t .ms-viewheadertr
\t {
\t display: none;
\t }
\t .ms-WPHeader
\t {
\t \t background: #93BBE4!important; \t \t
\t }
\t .ms-WPTitle
\t {
\t \t font-family: Verdana, Tahoma, sans-serif; \t
\t \t font-size: 14px!important; \t \t
\t \t color: #fffef9;
\t \t font-weight: bolder!important;
\t }
\t
\t .ms-WPTitle A:link, .ms-WPTitle A:visited
\t {
\t color:#fffef9;
\t text-decoration:none;
\t cursor:hand;
\t }
\t \t
\t #cssmenu {
\t padding: 0;
\t margin: 0;
\t border: 0;
\t position: relative;
\t z-index:1;
\t padding-bottom: 25px;
\t font-family: Verdana, Tahoma, sans-serif;
\t }
\t #cssmenu ul,
\t #cssmenu ul li,
\t #cssmenu ul ul,
\t #cssmenu ul ul ul {
\t list-style: none;
\t margin: 0;
\t padding: 0;
\t border: 0; \t
\t }
\t #cssmenu ul {
\t position: relative;
\t z-index: 397;
\t
\t }
\t #cssmenu ul li {
\t min-height: 1px;
\t line-height: 1em;
\t vertical-align: middle; \t
\t }
#cssmenu ul {
display: flex;
flex-wrap: wrap;
}
#cssmenu ul li {
flex: 1 0 25%;
}
\t #cssmenu ul li:hover {
\t position: relative;
\t //z-index: 99;
\t cursor: default; \t
\t }
\t #cssmenu ul ul {
\t visibility: hidden;
\t position: absolute;
\t top: 100%;
\t left: 0;
\t /* z-index: 398; */
\t width: 100%; \t
\t }
\t #cssmenu ul ul ul {
\t top: 0px;
\t left: 99%;
\t }
\t #cssmenu ul li:hover > ul {
\t visibility: visible;
\t width:170px;
\t }
\t #cssmenu ul ul {
\t bottom: 0px;
\t left: 0;
\t }
\t /* Custom CSS Styles */
\t #cssmenu ul {
\t width: 100px; \t
\t }
\t #cssmenu ul ul {
\t width: 167px; \t
\t }
\t #cssmenu ul li {
\t padding: 7px 7px;
\t color: #000000;
\t background-color: #cce5ff;
\t //background-color:#FFF;
\t //border: 1px solid red;
\t border-bottom: 1px solid #f1f5f9;
\t }
\t #cssmenu ul li:hover {
\t background: #cce5ff;
\t color: #000;
\t box-shadow:1px 1px 10px 2px #888;
\t }
\t #cssmenu ul a:link,
\t #cssmenu ul a:visited {
\t color: #000;
\t text-decoration: none; \t
\t }
\t #cssmenu ul a:hover {
\t color: #000; \t
\t }
\t #cssmenu ul a:active {
\t color: #ffa500; \t
\t }
\t
\t #cssmenu ul li a:link,
\t #cssmenu ul li a:visited{
\t /* color: #FFFFFF;
\t outline: none!important; */
\t }
\t
\t #cssmenu ul li a img{
\t /* color: #FFFFFF;
\t outline: none!important; */
\t }
\t
</style>
<div id='cssmenu'>
<ul>
<table cellpadding="1" cellspacing="1" style="width: 100%;">
<tbody>
<tr>
<td>
<li><img alt="Countries" src="https://cdn.vectorstock.com/i/thumb-large/57/49/1285749.jpg" style="width: 112px; height: 117px;" /> Select Country \t \t \t \t
<ul>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Argentina.aspx'><span>Argentina</span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_USA .aspx'><span>USA </span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_USA .aspx'><span>All others </span></a></li>
\t \t \t \t
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Argentina.aspx'><span>Argentina</span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Bahrain .aspx'><span>Bahrain </span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Belleli.aspx'><span>Belleli</span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Bolivia.aspx'><span>Bolivia</span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Brazil.aspx'><span>Brazil</span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Canada.aspx'><span>Canada</span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Chile.aspx'><span>Chile</span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_China .aspx'><span>China </span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Colombia.aspx'><span>Colombia</span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Dubai .aspx'><span>Dubai </span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Ecuador.aspx'><span>Ecuador</span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Egypt.aspx'><span>Egypt</span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Europe.aspx'><span>Europe</span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Gabon .aspx'><span>Gabon </span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Hamriyah.aspx'><span>Hamriyah</span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Indonesia .aspx'><span>Indonesia </span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Marine/Offshore travel.aspx'><span>Marine/Offshore travel</span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Mexico.aspx'><span>Mexico</span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Nigeria .aspx'><span>Nigeria </span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Oman .aspx'><span>Oman </span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Pakistan .aspx'><span>Pakistan </span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Peru .aspx'><span>Peru </span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Qatar.aspx'><span>Qatar</span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Russia.aspx'><span>Russia</span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Saudi Arabia.aspx'><span>Saudi Arabia</span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Singapore .aspx'><span>Singapore </span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_Thailand .aspx'><span>Thailand </span></a></li>
\t \t \t \t <li><a href='https://inside.nov.com/HR/Pages/Travel/Travel_USA .aspx'><span>USA </span></a></li>
</ul>
</li>
</td>
<td>
<li>
<img alt="UsefulLinks" src="https://cdn.vectorstock.com/i/thumb-large/67/94/9236794.jpg" style="width: 112px; height: 117px;" /> Useful Links
<ul>
<li><a href='https://inside.nov.com/crp/docs/ProjectManagement/PJM-FRM-0010.docx'><span>Travel Request Form</span></a></li>
<li><a href='https://inside.nov.com/HyattExtra/Hyatt%20Extra%2069%20-%20International%20Travel%20and%20Security.pdf'><span>International Travel & Security</span></a></li>
<li><a href='https://inside.nov.com/HR/Documents/Travel/PassportChecklist.pdf'><span>Passport Checklist</span></a></li>
<li><a href='http://www.google.com'><span>P-Card Q/A</span></a></li>
\t \t \t \t <li><a href='http://www.google.com'><span>Frequently Asked Questions</span></a></li>
\t \t \t \t
</ul>
</li>
</td>
<td>
<li>
<img alt="Policy" src="https://cdn.vectorstock.com/i/thumb-large/26/57/9082657.jpg" style="width: 112px; height: 117px;" /> Policy
<ul>
<li><a href='https://inside.nov.com/PolicyDocs/202%20Travel%20Policy%202016-0826.docx'><span>Policy 202: Travel Guidelines</span></a></li>
<li><a href='https://inside.nov.com/PolicyDocs/202-1%20Security%20Guidelines%20for%20Traveling%20Outside%20Your%20Home%20Country.doc'><span>Policy Attachment 202-1: Security Guidelines for Traveling Outside Your Home Country</span></a></li>
<li><a href='https://inside.nov.com/PolicyDocs/202-2%20International%20Travel%20Checklist.pdf'><span>Policy Attachment 202-2: International Travel Checklist</span></a></li>
</ul>
</li>
</td>
\t \t
<td>
<li><img alt="Tools" src="https://cdn.vectorstock.com/i/thumb-large/11/54/3361154.jpg" style="width: 112px; height: 117px; text-align: center;" /> Tools & Resources
<ul>
\t \t \t \t \t <li><a href='http://www.xe.com/travel-expenses-calculator/'><span>Currency Converter</span></a></li>
\t \t \t \t \t <li><a href='http://www.google.com/world'><span>Mileage Calculation</span></a></li>
\t \t \t \t \t <li><a href='https://inside.nov.com'><span>Tips for Expense Reporting</span></a></li>
\t \t \t \t \t <li><a href='https://inside.nov.com'><span>Receipts</span></a></li>
\t \t \t \t \t <li><a href='http://travel.state.gov'><span>Travel Warnings</span></a></li>
\t \t \t \t \t <li><a href='http://www.flightview.com/TravelTools'><span>Flight Tracker Tool</span></a></li>
\t \t \t \t \t <li><a href='http://www.intellicast.com/National'><span>National Weather</span></a></li>
\t \t \t \t \t <li><a href='http://quickaid.com'><span>Airport Information Directories</span></a></li>
\t \t \t \t \t <li><a href='http://cibtvisas.com'><span>Visa Requirements</span></a></li>
\t \t \t \t \t <li><a href='http://www.flightview.com/TravelTools'><span>Mobile Phone - Roaming/Charges</span></a></li>
\t \t \t \t \t
</ul>
</li>
</td>
</tr>
</tbody>
</table>
</ul>
</div>
哪些瀏覽器和瀏覽器版本這是否需要在工作嗎? http://caniuse.com/#feat=multicolumn – BSMP
IE 11是我們公司的默認瀏覽器,但他們也允許鉻和移動設備(主要是iPad) –
你能提供一個[mcve]來證明這個問題嗎?如果我把你的CSS放在小提琴中,併爲列添加規則 - 這裏:https://jsfiddle.net/MrLister/ax4g9ubk/ - 它在所有瀏覽器中都很好用。 –