开发者

Div positioning varies when runat="server"

Hai guys,

Error div is placed under menu div when there is no runat="server".... But When i give Runat="server" Error div placed to the right of menu div.. any suggestion for placing error div under menu div

<div id="content">
      <div id="menu">
       </div>

      <div id="ErrorDiv" runat="server">
      </div>

</div>

css:

#content
{
     clear:both;width:100%;float:left;
}

#menu
{
     clear:both;float:left;padding-left:15px;width:70%; height:37px;
}

#ErrorDiv
{
    clea开发者_开发问答r:both; width:75%;float:left;
}


When runat="server", the ID of the div changes, so the CSS rule isn't applied (you can see it if you view the source of your page).
A simple solution is to use a css class, or a combination of two elements - one that runs at the server, and one that doesn't.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜