2012-11-28 10 views
24

मेरे पास निम्न कोड में दी गई HTML तालिका है। इसमें 16 कॉलम हैं। मैं जावास्क्रिप्ट का उपयोग कर सेल चौड़ाई निर्धारित कर रहा हूँ। जब कुल चौड़ाई 100% से कम है, तो यह ठीक काम कर रही है।तालिका की कोशिकाएं छिपी जाती हैं जब कुल चौड़ाई 100% से अधिक

जब कुल चौड़ाई 100% से अधिक हो जाती है, तो मैं horizontal scroll bar प्रदर्शित करना चाहता हूं। लेकिन जब मैंने पीले हाइलाइट किए गए सेल की चौड़ाई 5% से 30% तक बदल दी, तो सभी शेष कोशिकाएं स्क्रॉल बार की उपस्थिति के बजाय छिपी हुईं।

प्रश्न:

  1. क्यों स्क्रॉलबार वर्तमान में दिखाई दे रहा है?
  2. scroll bar दिखाकर हम इसे उचित तरीके से कैसे काम कर सकते हैं? (इसके अलावा दो पीले स्तंभ चाहिए visible के बाद कॉलम; छिपी नहीं)

नोट: इस मुद्दे को IE8 में विख्यात है।

नोट: कोड के लिए http://jsfiddle.net/Lijo/dYSfN/2/ देखें। यह मुद्दा नहीं दिखाता है। मुद्दा visualizing के लिए, एक HTML फ़ाइल में कोड को कॉपी करें और IE8

अद्यतन

का उपयोग कर खुला जबकि hiding a column, शेष कॉलम चौड़ाई स्वचालित रूप से फ़ायरफ़ॉक्स और क्रोम में तालिका चौड़ाई को समायोजित कर देता है, लेकिन नहीं IE8 में। IE8 में तालिका चौड़ाई shrinks

http://srikanthgade.blogspot.in/2010/09/ie8-standards-table-layout-fixed.html#!/2010/09/ie8-standards-table-layout-fixed.html

समस्या के विवरण

जब पीला हाइलाइट सेल चौड़ाई है 5%

enter image description here

जब पीला हाइलाइट सेल चौड़ाई है 30%

enter image description here

स्टाइल

.gridTableBorder 
    { 
     overflow:scroll; 
     border: 2px solid green; 
    } 

    /*GridView Tables*/ 
    .resultGridTable 
    { 
     table-layout: fixed; /*Needed along with word wrap */ 
    } 

    .resultGridTable th 
    { 
     background-color: #A7A7A6; 
     color: #ffffff; 
     padding: 2px 5px 2px 5px; 
     font: bold 9pt Arial; 
     border: 1px solid red; 
     word-wrap: break-word; 
    } 

    .resultGridTable td 
    { 
     padding: 0px 5px 0px 5px; 
     font: normal 9pt Arial; 
     word-wrap: break-word; 
     border: 1px solid blue; 
    } 

JAVASCRIPT

$(document).ready(function() { 


     //Width Setting 
     var numberOfColumns = 16; 
     $('.resultGridTable th, .resultGridTable td').each(function (i) { 


      if (i % numberOfColumns == 0) { 
       $(this).css('width', '1%'); 
      } 

      if (i % numberOfColumns == 1) { 
       $(this).css('width', '10%'); 
      } 

      if (i % numberOfColumns == 2) { 
       $(this).css('width', '9%'); 

      } 

      if (i % numberOfColumns == 3) { 
       $(this).css('width', '8%'); 
       $(this).css('background-color', 'orange'); 
      } 

      if (i % numberOfColumns == 4) { 
       $(this).css('width', '6%'); 
      } 
      if (i % numberOfColumns == 5) { 
       $(this).css('width', '8%'); 
      } 
      if (i % numberOfColumns == 6) { 
       $(this).css('width', '5%'); 
      } 
      if (i % numberOfColumns == 7) { 
       $(this).css('width', '5%'); 
      } 
      if (i % numberOfColumns == 8) { 
       $(this).css('width', '5%'); 
      } 

      /// 
      if (i % numberOfColumns == 9) { 
       $(this).css('width', '7%'); 
      } 
      if (i % numberOfColumns == 10) { 
       $(this).css('width', '8%'); 
       $(this).css('background-color', 'orange'); 
      } 

      if (i % numberOfColumns == 11) { 
       $(this).css('width', '5%'); 
      } 
      if (i % numberOfColumns == 12) { 
       $(this).css('width', '5%'); 
      } 

      if (i % numberOfColumns == 13) { 
       $(this).css('width', '30%'); 
       $(this).css('background-color', 'Yellow'); 
      } 

      if (i % numberOfColumns == 14) { 
       $(this).css('width', '7%'); 
      } 

      if (i % numberOfColumns == 15) { 
       $(this).css('width', '7%'); 
      } 

     } 
     ); 


     //Hide Is Summary Row Column 
     var selectedElements = $("tr").find("th:first, td:first"); 
     $(selectedElements).hide(); 


    } 
    ); 

एचटीएमएल

<body> 
<form method="post" action="LocalTaxReport.aspx" id="form1"> 
<div id="wrapper"> 
    <div id="container"> 
     <div id="centralContainer"> 
      <div id="mainContainer"> 
       <div id="contentHolderDiv" class="contentHolderDiv"> 
        <div id="resultContainer" class="resultContainerDiv"> 
         <div id="gridDiv" class="gridTableBorder"> 
          <div> 
           <table class="resultGridTable" cellspacing="0" id="detailContentPlaceholder_grdLocalTaxReport" 
            style="border-collapse: collapse;"> 
            <tr> 
             <th scope="col"> 
              IsSummaryRow 
             </th> 
             <th scope="col"> 
              Associate 
             </th> 
             <th scope="col"> 
              My Amount 
             </th> 
             <th scope="col"> 
              Federal Withholding 
             </th> 
             <th scope="col"> 
              Social Security 
             </th> 
             <th scope="col"> 
              Medicaring 
             </th> 
             <th scope="col"> 
              State Tax 
             </th> 
             <th scope="col"> 
              County Tax 
             </th> 
             <th scope="col"> 
              City Tax 
             </th> 
             <th scope="col"> 
              Total 
             </th> 
             <th scope="col"> 
              State 
             </th> 
             <th scope="col"> 
              State Code 
             </th> 
             <th scope="col"> 
              County 
             </th> 
             <th scope="col"> 
              County Code 
             </th> 
             <th scope="col"> 
              City 
             </th> 
             <th scope="col"> 
              City Code 
             </th> 
            </tr> 
            <tr> 
             <td> 
              False 
             </td> 
             <td> 
              Mary Dryden 
             </td> 
             <td> 
              $3450 
             </td> 
             <td> 
              $32 
             </td> 
             <td> 
              $5 
             </td> 
             <td> 
              $2 
             </td> 
             <td> 
              $10 
             </td> 
             <td> 
              $1 
             </td> 
             <td> 
              $2 
             </td> 
             <td> 
              $3400 
             </td> 
             <td> 
              Arkansas 
             </td> 
             <td> 
              AR 
             </td> 
             <td> 
              Benton 
             </td> 
             <td> 
              04567 
             </td> 
             <td> 
              Bentonville 
             </td> 
             <td> 
              23156 
             </td> 
            </tr> 
           </table> 
          </div> 
         </div> 
        </div> 
        <div class="clear"> 
        </div> 
       </div> 
      </div> 
      <div class="clear"> 
      </div> 
     </div> 
    </div> 
</div> 
</form> 

<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.4.1.js"></script> 

</body> 
+0

आप अन्य सीएसएस इस जाता है कि यहां पोस्ट नहीं प्रभावित कर रहा है? मैं पूछता हूं, क्योंकि जब मैं आपका कोड सेट करता हूं और इसे IE8 पर चलाता हूं तो मुझे आपके द्वारा वर्णित व्यवहार दिखाई नहीं देता है। इस तालिका को दफन किए गए सभी रैपर तत्वों के लिए सीएसएस क्या है? – ScottS

+0

@ स्कॉट्स मेरे पास कोई अन्य सीएसएस नहीं है। सभी कोड यहां पोस्ट किया गया है। एनरिको के जवाब से ऐसा लगता है जैसे कि यह reproducbale – Lijo

+1

है जब मैं 30% पर एक पेज और IE8 में दृश्य सेट अप, यह सिर्फ बलों अन्य तालिका सेल चौड़ाई समायोजित कर देता है 100% चौड़ाई पर तालिका रखने के लिए। मैं आईई 9 ब्राउज़र मोड को दिखाने के लिए आईई 9 सेट में विंडोज 7 देख रहा हूं। तो मुझे लगता है कि मैं किसी भी मदद से नहीं हो सकता। – ScottS

उत्तर

18

मैंने कुछ संशोधन के साथ वांछित प्रभाव प्राप्त करने का प्रयास किया और मैं इसे यहां वर्णित करने जा रहा हूं।

  1. आपको doctype सेट करने की आवश्यकता है। अधिकांश वर्तमान मार्कअप भाषाओं के लिए एक डॉक्टरेट घोषणा अनिवार्य है और बिना किसी दस्तावेज़ को विश्वसनीय रूप से मान्य करना या निर्धारित करना है कि कौन से नियम लागू होंगे।

  2. आप स्क्रॉल बार नहीं देख रहे हैं क्योंकि तालिका की चौड़ाई सेट नहीं है। डिफ़ॉल्ट रूप से div 100% लेता है। अब div को overflow प्रॉपर्टी सेट करें और फिर स्क्रॉल बार देखने के लिए तालिका की चौड़ाई 120% पर सेट करें (जो div के 100% से अधिक है)।

  3. 120% की तालिका चौड़ाई का मतलब यह नहीं है कि आप सभी कॉलम चौड़ाई को 120 पर जोड़ सकते हैं। table-layout:fixed के बाद से, यदि आप टेबल चौड़ाई 120% के रूप में सेट करते हैं, तो भी आपको सभी कॉलम चौड़ाई को 100 पर टैली करने की आवश्यकता है।

  4. आपके कोड में आप सभी कॉलम और पंक्तियों की चौड़ाई निर्धारित कर रहे थे, इसके बजाय केवल th पर चौड़ाई लागू करें या पहली पंक्ति जो सभी पंक्तियों (संपूर्ण तालिका) में सभी कॉलम के साथ लागू होगी।

  5. if..if..if का उपयोग करने से आपके कोड संशोधित उपयोग करने के लिए if..else if..else if

नोट: 4 और 5 मौजूदा कोड से सुधार कर रहे हैं।

डेमो:http://jsfiddle.net/FP7MF/2/embedded/result/

पूर्ण कोड:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head id="Head1"> 
    <title>My Report </title> 
    <style type="text/css"> 

     /*GridView Tables*/ 
     .resultGridTable 
     { 
      table-layout: fixed; 
      width: 130%; 
     } 

     .resultGridTable th 
     { 
      background-color: #A7A7A6; 
      color: #ffffff; 
      padding: 2px 5px 2px 5px; 
      font: bold 9pt Arial; 
      border: 1px solid red; 
      word-wrap: break-word; 
     } 

     .resultGridTable td 
     { 
      padding: 0px 5px 0px 5px; 
      font: normal 9pt Arial; 
      word-wrap: break-word; 
      border: 1px solid blue; 
     } 

     #gridDiv div { overflow: auto; } 

    </style> 
</head> 
<body> 
    <form> 
     <div id="wrapper"> 
      <div id="container"> 
       <div id="centralContainer"> 
        <div id="mainContainer"> 
         <div id="contentHolderDiv" class="contentHolderDiv"> 
          <div id="resultContainer" class="resultContainerDiv"> 
           <div id="gridDiv" class="gridTableBorder"> 
            <div> 
             <table class="resultGridTable" cellspacing="0" id="detailContentPlaceholder_grdLocalTaxReport" 
              style="border-collapse: collapse;"> 
              <tr> 
               <th scope="col">IsSummaryRow</th> 
               <th scope="col">Associate</th> 
               <th scope="col">My Amount</th> 
               <th scope="col">Federal Withholding</th> 
               <th scope="col">Social Security</th> 
               <th scope="col">Medicaring</th> 
               <th scope="col">State Tax</th> 
               <th scope="col">County Tax</th> 
               <th scope="col">City Tax</th> 
               <th scope="col">Total</th> 
               <th scope="col">State</th> 
               <th scope="col">State Code</th> 
               <th scope="col">County</th> 
               <th scope="col">County Code</th> 
               <th scope="col">City</th> 
               <th scope="col">City Code</th> 
              </tr> 
              <tr> 
               <td>False</td> 
               <td>Mary Dryden</td> 
               <td>$3450</td> 
               <td>$32</td> 
               <td>$5</td> 
               <td>$2</td> 
               <td>$10</td> 
               <td>$1</td> 
               <td>$2</td> 
               <td>$3400</td> 
               <td>Arkansas</td> 
               <td>AR</td> 
               <td>Benton</td> 
               <td>04567</td> 
               <td>Bentonville</td> 
               <td>23156</td> 
              </tr> 
             </table> 
            </div> 
           </div> 
          </div> 
          <div class="clear"></div> 
         </div> 
        </div> 
        <div class="clear"></div> 
       </div> 
      </div> 
     </div> 
    </form> 
    <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.4.1.js"></script> 

    <script type="text/javascript"> 


     $(document).ready(function() { 


      //Width Setting 
      var numberOfColumns = 16; 
      $('.resultGridTable th').each(function (i) { 

       if (i % numberOfColumns == 0) { 
        $(this).css('width', '1%'); 
       } else if (i % numberOfColumns == 1) { 
        $(this).css('width', '10%'); 
       } else if (i % numberOfColumns == 2) { 
        $(this).css('width', '9%'); 
       } else if (i % numberOfColumns == 3) { 
        $(this).css({'width': '8%', 'background-color': 'orange'}); 
       } else if (i % numberOfColumns == 4) { 
        $(this).css('width', '6%'); 
       } else if (i % numberOfColumns == 5) { 
        $(this).css('width', '8%'); 
       } else if (i % numberOfColumns == 6) { 
        $(this).css('width', '5%'); 
       } else if (i % numberOfColumns == 7) { 
        $(this).css('width', '5%'); 
       } else if (i % numberOfColumns == 8) { 
        $(this).css('width', '5%'); 
       } else if (i % numberOfColumns == 9) { 
        $(this).css('width', '7%'); 
       } else if (i % numberOfColumns == 10) { 
        $(this).css({'width': '8%', 'background-color': 'orange'}); 
       } else if (i % numberOfColumns == 11) { 
        $(this).css('width', '5%'); 
       } else if (i % numberOfColumns == 12) { 
        $(this).css('width', '5%'); 
       } else if (i % numberOfColumns == 13) { 
        $(this).css({'width': '8%', 'background-color': 'Yellow'}); 
       } else if (i % numberOfColumns == 14) { 
        $(this).css('width', '5%'); 
       } else if (i % numberOfColumns == 15) { 
        $(this).css('width', '5%'); 
       } 

      }); 

      //Hide Is Summary Row Column 
      var selectedElements = $("tr").find("th:first, td:first"); 
      $(selectedElements).hide(); 
     }); 

    </script> 
</body> 
</html> 
+0

जब मैंने पीले कॉलम की चौड़ाई 30% के रूप में बनाई, तो पीले कॉलम के बाद कॉलम ठीक से प्रदर्शित नहीं होते हैं। हम इसे कैसे ठीक कर सकते हैं? – Lijo

+3

क्या आपने तीसरी वस्तु पढ़ी जो कॉलम चौड़ाई की कुल राशि '100' से अधिक नहीं है .. यह काम करेगा यदि आप इसे' 100% 'तक बताते हैं। –

+0

मुझे नहीं लगता कि यही कारण है। यह क्रोम और फ़ायरफ़ॉक्स में 30% के साथ भी ठीक काम कर रहा है। उसके पीछे कोई तर्क? – Lijo

1

मुझे माफ कर दो अगर मैं गलत हूँ, लेकिन इस के रूप में overflow:scroll; जोड़कर हल नहीं किया जा सकता है div के लिए एक सीएसएस नियम जिसमें टेबल है?

+0

यह काम नहीं करता है। मैंने कोशिश की .gridTableBorder {ओवरफ्लो: स्क्रॉल; सीमा: 2 पीएक्स ठोस हरा; } – Lijo

2

यह एक सही समाधान नहीं है, लेकिन टेबल चौड़ाई को 120% तक सेट करना और कॉलम चौड़ाई को तालिका चौड़ाई के प्रतिशत के रूप में बदलना (इसलिए वे 100% तक योग) वांछित प्रभाव प्राप्त करते हैं।

+0

क्या आप समझा सकते हैं कि चौड़ाई 100% होने पर स्क्रॉलबार क्यों नहीं दिख रहा है? – Lijo

+1

अभी तक नहीं, लेकिन अगर मैं इसे समझता हूं तो मैं अपना जवाब अपडेट कर दूंगा। – Enrico

1

हम टेबल लेआउट रखने के लिए IE8 में तय हो गई के रूप में की जरूरत है, तो नीचे दिए गए वैकल्पिक हल कॉलम छुपा के बाद जोड़ा जा करने की जरूरत है :

: 
: 
$(selectedElements).hide(); 

// Add the workaround after the above line (or when hiding of columns is done). 
$(".resultGridTable").attr("style","display:inline-table;"); 
window.setTimeout(function(){$(".resultGridTable").attr("style","");},0); 

यह IE8 में एक बग है, लेकिन ऐसा लगता है कि माइक्रोसॉफ्ट किसी भी संकल्प पर जवाब नहीं दिया है। अगर आपको कोई जानकारी मिलती है, तो कृपया इसे यहां पोस्ट करें।

लेकिन मैंने कामकाज की कोशिश की है, फिर भी यह वांछित आउटपुट नहीं देता है।

बस, यहाँ यह जोड़ा इतना है कि यह कुछ और आर में & डी मदद कर सकता है

संदर्भ:

http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/f265c5b1-a45d-4949-85b2-86a97a884dc1/

वर्कअराउंड:

IE8 isn't resizing tbody or thead when a column is hidden in a table with table-layout:fixed

http://srikanthgade.blogspot.in/2010/09/ie8-standards-table-layout-fixed.html

+0

IE8 में IE8 का प्रयास करें :-) कृपया प्रश्न – Lijo

+0

मैं पोस्ट को अद्यतन किया है में भी @ScottS टिप्पणी का संदर्भ लें। मुझे बताएं कि क्या यह आपकी समस्या हल करता है। – Rups

+1

इससे मदद नहीं मिलेगी। मुझे तय करने के लिए टेबल लेआउट की आवश्यकता है। कृपया बताएं कि यह क्रोम और फ़ायरफ़ॉक्स में टेबल लेआउट के साथ क्यों काम करता है (साबित करने के कुछ संदर्भों के साथ) – Lijo

1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>Untitled Document</title> 
<style type="text/css"> 
.gridTableBorder 
    { 
     overflow:scroll; 
     border: 2px solid green; 
    } 

    /*GridView Tables*/ 
    .resultGridTable 
    { 
     /*table-layout: fixed;*/ /*Needed along with word wrap */ 
    } 

    .resultGridTable th 
    { 
     background-color: #A7A7A6; 
     color: #ffffff; 
     padding: 2px 5px 2px 5px; 
     font: bold 9pt Arial; 
     border: 1px solid red; 
     /*word-wrap: break-word;*/ 
    } 

    .resultGridTable td 
    { 
     padding: 0px 5px 0px 5px; 
     font: normal 9pt Arial; 
     /*word-wrap: break-word;*/ 
     border: 1px solid blue; 
    } 
</style> 
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.4.1.js"></script> 
<script type="text/javascript"> 

$(document).ready(function() { 


     //Width Setting 
     var numberOfColumns = 16; 
     $('.resultGridTable th, .resultGridTable td').each(function (i) { 


      if (i % numberOfColumns == 0) { 
       $(this).css('width', '1%'); 
      } 

      if (i % numberOfColumns == 1) { 
       $(this).css('width', '10%'); 
      } 

      if (i % numberOfColumns == 2) { 
       $(this).css('width', '9%'); 

      } 

      if (i % numberOfColumns == 3) { 
       $(this).css('width', '8%'); 
       $(this).css('background-color', 'orange'); 
      } 

      if (i % numberOfColumns == 4) { 
       $(this).css('width', '6%'); 
      } 
      if (i % numberOfColumns == 5) { 
       $(this).css('width', '8%'); 
      } 
      if (i % numberOfColumns == 6) { 
       $(this).css('width', '5%'); 
      } 
      if (i % numberOfColumns == 7) { 
       $(this).css('width', '5%'); 
      } 
      if (i % numberOfColumns == 8) { 
       $(this).css('width', '5%'); 
      } 

      /// 
      if (i % numberOfColumns == 9) { 
       $(this).css('width', '7%'); 
      } 
      if (i % numberOfColumns == 10) { 
       $(this).css('width', '8%'); 
       $(this).css('background-color', 'orange'); 
      } 

      if (i % numberOfColumns == 11) { 
       $(this).css('width', '5%'); 
      } 
      if (i % numberOfColumns == 12) { 
       $(this).css('width', '5%'); 
      } 

      if (i % numberOfColumns == 13) { 
       $(this).css('width', '30%'); 
       $(this).css('background-color', 'Yellow'); 
      } 

      if (i % numberOfColumns == 14) { 
       $(this).css('width', '7%'); 
      } 

      if (i % numberOfColumns == 15) { 
       $(this).css('width', '7%'); 
      } 

     } 
     ); 


     //Hide Is Summary Row Column 
     var selectedElements = $("tr").find("th:first, td:first"); 
     $(selectedElements).hide(); 


    } 
    ); 
</script> 
</head> 

<body> 

<form method="post" action="LocalTaxReport.aspx" id="form1"> 
<div id="wrapper"> 
    <div id="container"> 
     <div id="centralContainer"> 
      <div id="mainContainer"> 
       <div id="contentHolderDiv" class="contentHolderDiv"> 
        <div id="resultContainer" class="resultContainerDiv"> 
         <div id="gridDiv" class="gridTableBorder"> 
          <div> 
           <table class="resultGridTable" cellspacing="1" id="detailContentPlaceholder_grdLocalTaxReport" style="border-collapse: collapse;"> 
            <tr> 
             <th scope="col"> 
              IsSummaryRow 
             </th> 
             <th scope="col"> 
              Associate 
             </th> 
             <th scope="col"> 
              My Amount 
             </th> 
             <th scope="col"> 
              Federal Withholding 
             </th> 
             <th scope="col"> 
              Social Security 
             </th> 
             <th scope="col"> 
              Medicaring 
             </th> 
             <th scope="col"> 
              State Tax 
             </th> 
             <th scope="col"> 
              County Tax 
             </th> 
             <th scope="col"> 
              City Tax 
             </th> 
             <th scope="col"> 
              Total 
             </th> 
             <th scope="col"> 
              State 
             </th> 
             <th scope="col"> 
              State Code 
             </th> 
             <th scope="col"> 
              County 
             </th> 
             <th scope="col"> 
              County Code 
             </th> 
             <th scope="col"> 
              City 
             </th> 
             <th scope="col"> 
              City Code 
             </th> 
            </tr> 
            <tr> 
             <td> 
              False 
             </td> 
             <td> 
              Mary Dryden 
             </td> 
             <td> 
              $3450 
             </td> 
             <td> 
              $32 
             </td> 
             <td> 
              $5 
             </td> 
             <td> 
              $2 
             </td> 
             <td> 
              $10 
             </td> 
             <td> 
              $1 
             </td> 
             <td> 
              $2 
             </td> 
             <td> 
              $3400 
             </td> 
             <td> 
              Arkansas 
             </td> 
             <td> 
              AR 
             </td> 
             <td> 
              Benton 
             </td> 
             <td> 
              04567 
             </td> 
             <td> 
              Bentonville 
             </td> 
             <td> 
              23156 
             </td> 
            </tr> 
           </table> 
          </div> 
         </div> 
        </div> 
        <div class="clear"> 
        </div> 
       </div> 
      </div> 
      <div class="clear"> 
      </div> 
     </div> 
    </div> 
</div> 
</form> 

</body> 
</html> 

मैंने आपकी समस्या से गुजर लिया है, मैंने आपके कोड और सीएसएस पर कुछ आर & डी किया है।मैंने टेबल-लेआउट को अभी हटा दिया है: फिक्स्ड और वर्ड-रैप: ब्रेक-वर्ड;

कौन सा IE8 में और साथ ही IE7 में इस मुद्दे को दे रहा था। आपकी स्क्रीन शॉट 2 में जिसमें शब्द-रैप के कारण सेल ऊंचाई बढ़ जाती है: ब्रेक-वर्ड।

अन्य ब्राउज़रों में यह ठीक काम कर रहा था। बस कोड कॉपी करें और अपने ब्राउज़र में जांचें। यदि आपकी ज़रूरतें टेबल-लेआउट का उपयोग किए बिना पूरा कर रही हैं: इससे तय और शब्द-लपेट सीएसएस संपत्ति आपके समाधान है।

@Lijo अगर मैं कुछ याद आ रही है तो कृपया मुझे बताएं।

+0

मैं तालिका-लेआउट को छोड़ नहीं सकता: निश्चित और शब्द-लपेटें: ब्रेक-शब्द; – Lijo

संबंधित मुद्दे