当前位置:编程学习 > C#/ASP.NET >>

如何改变表格中ContentPlaceHolder 控件占位大小?

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

<!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 runat="server">
    <title>母版页</title>
</head>
<body>
<center>
    <form id="form1" runat="server">
    <div>
        <table style="width: 720px; position: relative">
            <tr>
            <td style="height: 86px; width: 753px;">              
                    <img src="matherpig/bar5.gif" />
                    
                    <img src="matherpig/bar4.gif" />
                    </td>
             
            </tr>
            <tr>
                <td style="width: 753px; height: 30px">
                <marquee scrollAmount=3() onmouseover=stop() onmouseout=start() style="width: 700px"><a style=color:#CC1365>本系统由郑州大学软件学院2006级软件开发共同开发!</a></marquee>
                </td>
            </tr>
            <tr>
                <td valign="top"  style="height: 369px; width: 753px;" >
                 <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                    </asp:ContentPlaceHolder>
                </td>
            </tr>
            <tr>
                <td style="height: 47px; width: 753px;">
                    对新网站的意见与建议请发邮件给<br />
                    使用思宁前必读 京ICP证030173号<br />                  
                    </td>
            </tr>
            <tr>
            </tr>
            <tr>
            </tr>
        </table>
    </div>
    
    
  



<script Language="JavaScript">

var msg="此系统由郑州大学软件学院共同开发!";

var interval = 100;

var spacelen = 120;

var space10=" ";

var seq=0;

function Scroll() { 

len = msg.length;

window.status = msg.substring(0, seq+1);

seq++;

if ( seq >= len ) { 

seq = spacelen; 

window.setTimeout("Scroll2();", interval );

}

else

window.setTimeout("Scroll();", interval );



function Scroll2() { 

var out="";

for (i=1; i<=spacelen/space10.length; i++) out += 

space10;

out = out + msg;

len=out.length;

window.status=out.substring(seq, len);

seq++;

if ( seq >= len ) { seq = 0; };

window.setTimeout("Scroll2();", interval );



Scroll();

</script>



    </form>
    </center>
</body>
</html>

--------------------编程问答-------------------- <td   valign="top"     style="height:   369px;   width:   753px;"   >
                                  <asp:ContentPlaceHolder   ID="ContentPlaceHolder1"   runat="server">
                                        </asp:ContentPlaceHolder>
                                </td> 

===================
你直接控制外面的td 就可以了,asp:ContentPlaceHolder 好像不能改变宽高,它是根据内容来动态改变的。
补充:.NET技术 ,  ASP.NET
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,