简体   繁体   中英

Table drop down selections not respecting Div

I have a container Div and within this I have a number of tables, the tables don't respect the div container size when I have a drop down menu being called. I cannot figure this one out, If I display the class the drop down filters are on to block, it respects the div. If i display it inline it ignores it! and over flow the container. Please help!

<table cellspacing="0" cellpadding="1" border="0">
                <tr>               



<!--START: catFilter_Filter-->
                  <td class="item1"  style="border-right:1px solid #ccc;" >
                  <select name="catFilter" id="Select1" onchange="setCatFilter(this.value, document.frmsortby, false);">
                  <option value="">[catFilterName]</option>
                    <!--START: catFilter_Filter_Item--> 
                    <option value="[catFilterId]-*-[catFilterName]-*-[catFilterChildId]-*-[catFilterChildName]-*-[catid]-*-">[catFilterChildName] ([numItems])</option> 
                    <!--END: catFilter_Filter_Item--> 
                    </select></td>
                  <!--END: catFilter_Filter-->
                </tr>
              </table>
        <input type="hidden" name="hdnCatFilter" id="hdnCatFilter" value="[catFilter]" />
        <script type="text/javascript">
            function setCatFilter(strFilter, objForm, removeSubsequent)
            {
                if (removeSubsequent)
                {
                    //alert(strFilter);
                    objForm.hdnCatFilter.value = strFilter;
                }
                else
                {
                    objForm.hdnCatFilter.value = objForm.hdnCatFilter.value + '@' + strFilter;
                }
                //alert(objForm.hdnCatFilter.value);
                objForm.submit();
            }
            function removeCatFilter()
            {
                var objForm = document.frmsortby;
                objForm.hdnCatFilter.value = "";
                objForm.submit();
            }
        </script></td>
    </tr>

Your table is close before including the <input> and the <script> tags. You have a rogue </td> and </tr> . Move </table> after the last </tr> .

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