简体   繁体   English

如何摆脱div周围的白色边框?

[英]How to get rid of white border around div?

Not sure if this is padding or what...Need to get rid of that lil white border. 不知道这是填充还是什么...需要摆脱那个浅白色边框。 btw this code is included in a master table. 顺便说一句,此代码包含在主表中。

在此处输入图片说明

  <tr>
    <th>
    <span onclick="toggleDiv('favorites', 'favImg')" style="cursor: hand;">Favorites&nbsp;<img name="favImg" src="../images/minus.gif" /></span>
    </th>
    </tr>
    <tr>
    <td>
    <div class="det" id="favorites">

    <table class="det" >
    <tr>
    <td>
        <fieldset class="det" style="padding:25;">
        <legend>Favorites</legend>
        <br/>
            <input type="radio" name="favRadio" value="public" onclick="choiceToggle('public');"/>Public:&nbsp;<select size="1" id="pubFav" name="pubFav" disabled>
                        <option selected value="">&nbsp;</option>
                        <c:forEach var="fav" items="${pubFavorites}">
                            <option value="${fav.id}">${fav.description}</option>
                        </c:forEach>
                   </select>
            <br/>
            <input type="radio" name="favRadio" value="user" onclick="choiceToggle('user');"/>User:&nbsp;&nbsp;&nbsp;<select size="1" id="userFav" name="userFav" disabled>
                        <option selected value="">&nbsp;</option>
                        <c:forEach var="fav" items="${userFavorites}">
                            <option value="${fav.id}">${fav.description}</option>
                        </c:forEach>
                 </select>
            <br/>
            <input type="radio" name="favRadio" value="custom" checked onclick="choiceToggle('custom');"/>Custom&nbsp;
        </fieldset>

        <fieldset class="det">
        <legend>Favorite Management Options</legend>
            <input type="radio" name="fav_choice" id="fav_choice" style="display:none;" value=""/>

            <input type="radio" name="fav_choice" id="fav_choice" value="rem_fav"/>Remove Favorite:&nbsp;
            <select size="1" id="removeFav" name="removeFav">
                <option selected value="">&nbsp;</option>
                <option value="id1">My saved report 1</option>
                <option value="id2">Stuff for Sally</option>
            </select>
            </br></br>

            <input type="radio" name="fav_choice" id="fav_choice" value="rename_fav"/>Rename Currently Selected Favorite:&nbsp;&nbsp;
            <input type="text" id="fav_rename" name="fav_rename" value=""/>
            </br></br>

            <input type="radio" name="fav_choice" id="fav_choice" value="updt_fav"/>Update / Overwrite Currently Selected Favorite&nbsp;
            </br></br>

            <input type="radio" name="fav_choice" id="fav_choice" value="add_fav"/>Add to Favorites&nbsp;&nbsp;
            <input type="text" id="add_fav_name" name="add_fav_name" value=""/>
            </br></br>

            <input type="button" name="do_choice" value="Execute Choice" onClick="processFavAction();"/>
            <input type="button" name="clear_choice" value="Clear Choice" onclick="clearFavMgmt();"/>

        </fieldset>


    </td>
</tr>
</table>
</div>
</td>
</tr>

css: CSS:

    table.det
    {
    background-color: #FFFFDD;
     border-collapse: collapse;
    }

    table.det td
    { 
     border: none; 
     background-color: #FFFFDD;
     }

     fieldset.det 
    {     
    display:block;
    float:left;

    font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size:12px;
    margin-top:20px;
    margin-left:20px;
    border:2px solid #CCCCCC;
    background-color: #FFFFDD;

    }
     fieldset.det legend
    {
        padding:2px 5px;
        border:2px solid #CCCCCC;
        font-weight:  bold;
        background-color: #FFFFDD;
     }

   div.det
    {   
     display:block;
     background-color: #FFFFDD;
     text-align: center;
     width: 100%;

    }

I think that everything 我认为一切

Your fieldset.det contains border:2px solid #CCCCCC; 您的fieldset.det包含border:2px solid #CCCCCC;

You could try to delete each of the two entries temporarily or just both. 您可以尝试临时删除两个条目中的每个条目,或者仅删除两个条目。 Keep a backup and see if it removes the border. 保留备份,看看是否删除边框。

Did you try border-style:none; 您是否尝试过border-style:none; in the CSS on the element that you don't want to display a border? 在CSS上您不想显示边框的元素上? Quite frankly your image is so small I can't tell what you're talking about. 坦率地说,您的形象太小了,我无法分辨您在说什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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