如何妥善放置div?

时间:2016-04-28 18:13:20

标签: html

我有丢失div的代码。你知道如何妥善安置div吗?无论我尝试什么代码都在我的网站上工作,但如果我再次保存更改,代码将从最后删除这些标记:

</textarea>
    </div>
</div>

我要做的是再次替换代码。它开始变得烦人。这是代码:

    <div id="CX_chatbox" class="cx-offline">
<div id="CX_btn_0" style="color: rgb(255, 255, 255); width: 250px; right: 30px; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; bottom: 0px; padding:10px; background-color:#327CCB;" class="cx-chat-btn cx-online-btn cx-no-ico">
    <div class="cx-ico cx-ico-chat" style="display:none"></div>
    <div class="cx-ico cx-ico-arrow-up" style="display:block;"></div>
    <div class="cx-title" style="display:block;">Chat</div>
</div>

<div id="CX_popup_0" data-id="0" class="cx-widget" style="display: none; width:300px; right:30px;bottom:0;border-radius:4px 4px 0 0; overflow: hidden;">
    <div class="cx-">
    <div id="CX_popup_header_0" class="cx-header" style="border-radius:4px 4px 0 0;background-color:#327CCB; color:#ffffff;">
        <div class="cx-title" style="text-align:left; padding:10px;">
            Chat
            <div class="cx-ico cx-ico-arrow-down" style="float:right;"></div>
        </div>

    </div>

    <div id="CX_popup_body_0" class="cx-body" style="height: 300px; overflow: hidden;">
        <div class="chat_content"></div>
    </div>

    <div class="chat_input">
        <textarea id="omdc" placeholder="Message..."></textarea>
    </div>
</div>

1 个答案:

答案 0 :(得分:1)

你需要再关闭两个div。见下文。

&#13;
&#13;
<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    </head>
  <body>
    
<div id="CX_chatbox" class="cx-offline">
<div id="CX_btn_0" style="color: rgb(255, 255, 255); width: 250px; right: 30px; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; bottom: 0px; padding:10px; background-color:#327CCB;" class="cx-chat-btn cx-online-btn cx-no-ico">
    <div class="cx-ico cx-ico-chat" style="display:none"></div>
    <div class="cx-ico cx-ico-arrow-up" style="display:block;"></div>
    <div class="cx-title" style="display:block;">Chat</div>
</div>

<div id="CX_popup_0" data-id="0" class="cx-widget" style="display: none; width:300px; right:30px;bottom:0;border-radius:4px 4px 0 0; overflow: hidden;">
    <div class="cx-">
    <div id="CX_popup_header_0" class="cx-header" style="border-radius:4px 4px 0 0;background-color:#327CCB; color:#ffffff;">
        <div class="cx-title" style="text-align:left; padding:10px;">
            Chat
            <div class="cx-ico cx-ico-arrow-down" style="float:right;"></div>
        </div>

    </div>

    <div id="CX_popup_body_0" class="cx-body" style="height: 300px; overflow: hidden;">
        <div class="chat_content"></div>
    </div>

    <div class="chat_input">
        <textarea id="omdc" placeholder="Message..."></textarea>
    </div>
</div>
  </div><!--This is missing -->
  </div><!--This is missing-->
  
  </body>
  </html>
&#13;
&#13;
&#13;