0

我有一个正在构建的 ASP 网站来替换当前的网站。网站在本地加载时正常显示,但在线加载时显示不正常。

来自本地加载的图像:

/images/local.jpg

图片来自在线加载:

/images/online.jpg

两个渲染之间的代码完全相同,可以在以下位置找到:

/pages/calendar.aspx

以上三个扩展都可以在根网站上找到:http: //troop7bhac.com/troop7/

我尝试调整边距、填充、宽度,几乎所有处理大小的 CSS 属性。

下面是页面上使用的代码的副本。

<%@ Page language="VB" masterpagefile="Troop7.master" title="Troop 7: Calendar" %>
<%@ Import namespace="System.Data" %>
<%@ Import namespace="System.Data.SqlClient" %>
<asp:Content id="Content1" runat="server" contentplaceholderid="content">
<form id="form1" runat="server">
    <asp:Table id="mainTable" runat="server">
        <asp:TableRow>
            <asp:TableCell>
                <asp:Calendar id="eventCalendar" runat="server" BackColor="White" BorderColor="Black" DayNameFormat="Shortest" Font-Names="Times New Roman" Font-Size="20pt" ForeColor="Black" NextPrevFormat="FullMonth" FirstDayOfWeek="Sunday" ShowGridLines="True" OnDayRender="eventCalendar_DayRender" Width="487.5px" Height="500px" SelectionMode="None" Font-Bold="True">
                    <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="15pt" ForeColor="#333333" Height="10px" />
                    <DayStyle Width="14%" />
                    <NextPrevStyle Font-Size="10pt" ForeColor="White" />
                    <OtherMonthDayStyle ForeColor="#999999" BackColor="Black" />
                    <SelectedDayStyle BackColor="#CC3333" ForeColor="White" />
                    <SelectorStyle BackColor="#CCCCCC" Font-Bold="True" Font-Names="Verdana" Font-Size="10pt" ForeColor="#333333" Width="1%" />
                    <TitleStyle BackColor="Black" Font-Bold="True" Font-Size="15pt" ForeColor="White" Height="15pt" />
                    <TodayDayStyle BackColor="#CCCC99" />
                </asp:Calendar>
            </asp:TableCell>
            <asp:TableCell>
                <asp:Label id="eventLabel" runat="server" Font-Size="15pt" Text="Label" Width="500px"></asp:Label>
            </asp:TableCell>
        </asp:TableRow>
    </asp:Table>
    <asp:SqlDataSource id="eventDatabase" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString1 %>" ProviderName="<%$ ConnectionStrings:ConnectionString1.ProviderName %>" SelectCommand="SELECT * FROM Dates">
    </asp:SqlDataSource>
</form>
</asp:Content>
<asp:Content id="Content2" runat="server" contentplaceholderid="head">
<style type="text/css">
    #mainTable {
        width: 1000px;
    }
</style>
<script runat="server">    
    Protected dsEvents As DataSet

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            eventCalendar.VisibleDate = DateTime.Today
            FillEventDataset()
        End If
    End Sub

    Protected Sub FillEventDataset()
        Dim firstDate As New DateTime(eventCalendar.VisibleDate.Year, eventCalendar.VisibleDate.Month, 1)
        Dim lastDate As DateTime = GetFirstDayOfNextMonth()
        dsEvents = GetCurrentMonthData(firstDate, lastDate)
    End Sub

    Protected Function GetFirstDayOfNextMonth() As DateTime
        Dim monthNumber, yearNumber As Integer
        If eventCalendar.VisibleDate.Month = 12 Then
            monthNumber = 1
            yearNumber = eventCalendar.VisibleDate.Year + 1
        Else
            monthNumber = eventCalendar.VisibleDate.Month + 1
            yearNumber = eventCalendar.VisibleDate.Year
        End If
        Dim lastDate As New DateTime(yearNumber, monthNumber, 1)
        Return lastDate
    End Function

    Protected Sub eventCalendar_VisibleMonthChanged(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MonthChangedEventArgs) Handles eventCalendar.VisibleMonthChanged
        FillEventDataset()
    End Sub

    Function GetCurrentMonthData(ByVal firstDate As DateTime, ByVal lastDate As DateTime) As DataSet
        Dim dsMonth As New DataSet
        Dim cs As ConnectionStringSettings
        cs = ConfigurationManager.ConnectionStrings("ConnectionString1")
        Dim connString As String = cs.ConnectionString
        Dim dbConnection As New SqlConnection(connString)
        Dim query As String
        query = "SELECT StartDate, EndDate, EventName, Troop FROM EventList WHERE (StartDate >= @firstDate AND StartDate < @lastDate) OR (EndDate >= @firstDate AND EndDate < @lastDate) ORDER BY StartDate"
        Dim dbCommand As New SqlCommand(query, dbConnection)
        dbCommand.Parameters.Add(New SqlParameter("@firstDate", firstDate))
        dbCommand.Parameters.Add(New SqlParameter("@lastDate", lastDate))
        Dim sqlDataAdapter As New SqlDataAdapter(dbCommand)
        Try
            sqlDataAdapter.Fill(dsMonth)
        Catch
        End Try
        Return dsMonth
    End Function

    Protected Sub eventCalendar_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles eventCalendar.DayRender
        Dim nextDate As DateTime
        If Not dsEvents Is Nothing Then
        eventLabel.text = ""
            For Each dr As DataRow In dsEvents.Tables(0).Rows
            Dim temp as String = ""
            If (CType(dr("StartDate"), DateTime) = CType(dr("EndDate"), DateTime))
                temp = CType(dr("StartDate"), DateTime) + " " + CType(dr("EventName"), String)
            Else
                temp = CType(dr("StartDate"), DateTime) + " to " + CType(dr("EndDate"), DateTime) + " " + CType(dr("EventName"), String)
            End If
            If (CType(dr("Troop"), Boolean) = True)
                temp = "<b>" + temp + "</b><br>"
            Else
                temp = temp + "<br>"
            End If
            eventLabel.text += temp
            nextDate = CType(dr("StartDate"), DateTime)
            If nextDate = e.Day.Date Then
                e.Cell.BackColor = System.Drawing.Color.Green
            End If
            Next
        End If
    End Sub
</script>
</asp:Content>

下面是渲染后的代码副本。

<!DOCTYPE html>

<html dir="ltr">
<head><meta content="en-us" http-equiv="Content-Language" /><meta content="text/html; charset=utf-8" http-equiv="Content-Type" /><title>
Troop 7: Calendar
</title>
<style type="text/css">
* {
padding: 0;
margin: 0;
}
body {
width: 1075px;
border-right-style: solid;
border-right-width: 1px;
border-right-color: black;
border-left-style: solid;
border-left-width: 1px;
border-left-color: black;
position: relative;
background-color: rgb(240, 230, 140);
margin: 0 auto 0 auto;
min-height: 100%;
}
html {
height: 100%;
}
#navigation ul {
list-style-type: none;
padding-top: 9px;
}
#navigation ul li {
float: left;
position: relative;
}
#navigation ul li ul {
border: 2px solid #88B4E4;
background-color: #AAD4FE;
display: none;
padding: 5px;
font-size: 13pt;
top: 32px;
}
#navigation ul li:hover ul {
display: block;
position: absolute;
}
#navigation ul li ul li a {
text-align: center;
display: block;
width: 100px;
padding: 5px;
}
#homeLogo {
text-decoration: none;
border: 0px;
}
#shoulder {
text-decoration: none;
border: 0px;
}
#address {
font-size: 10pt;
text-align: center;
border-top-style: solid;
border-top-width: 1px;
border-top-color: black;
padding-top: 5px;
padding-bottom: 5px;
bottom: 0px;
width: 100%;
position: absolute;
background-color: rgb(240, 230, 140);
}
#masterContent {
border-bottom-style: solid;
border-bottom-width: 1px;
border-bottom-color: black;
height: 177px;
background-color: rgb(240, 230, 140);
}
#placeHolder {
padding-top: 25px;
padding-bottom: 50px;
margin-left: auto;
margin-right: auto;
width: 1025px;
text-align: justify;
}
#placeHolder p {
font-size: 50pt;
text-align: center;
vertical-align: middle;
font-weight: bold;
}
#bottomLine {
font-size: 70pt;
line-height: 111px;
}
#topLine {
font-size: 15pt;
}
</style>
<meta content="Boy, Scouts, Scout, America, Penjahame, District, Black, Hills, Area, Council, Troop, Troop 7, Troop Seven" name="keywords" /><meta content="Troop 7 Master Template Page" name="description" />
<script type="text/javascript">
<!--
function FP_swapImg() {//v1.0
 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
 n+=2) { elm=FP_getObjectByID(args[n]); if(elm) {doc.$imgSwaps[doc.$imgSwaps.length]=elm;
 elm.$src=elm.src; elm.src=args[n+1]; } }
}

function FP_preloadImgs() {//v1.0
 var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
 for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}

function FP_getObjectByID(id,o) {//v1.0
 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
 else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
 if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
 for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
 f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
 for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
 return null;
}
// -->
</script>

<style type="text/css">
    #mainTable {
        width: 1000px;
    }
</style>
</head>

<body onload="FP_preloadImgs(/*url*/'../Images/button132.gif',/*url*/'../Images/button133.gif',/*url*/'../Images/button135.gif',/*url*/'../Images/button136.gif',/*url*/'../Images/button139.gif',/*url*/'../Images/button13A.gif',/*url*/'../Images/button13C.gif',/*url*/'../Images/button13D.gif',/*url*/'../Images/button13F.gif',/*url*/'../Images/button140.gif',/*url*/'../Images/button142.gif',/*url*/'../Images/button143.gif',/*url*/'../Images/button145.gif',/*url*/'../Images/button146.gif',/*url*/'../Images/button14B.gif',/*url*/'../Images/button14C.gif',/*url*/'../Images/button166.gif',/*url*/'../Images/button167.gif')">

<div id="ctl00_masterContent">
<p><a href="Home.aspx">
<img id="homeLogo" alt="Boy Scouts of America Logo" height="175" longdesc="Boy Scouts of America Logo" src="../Images/BSALogoOriginal.png" style="float: left" width="175"></a><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span id="topLine">Boy Scouts of America Penjahame District Black 
Hills Area Council</span><a href="http://blackhillsareacouncil.com/" target="_blank"><img id="shoulder" alt="Red, White, and Blue Shoulder Patches" height="142" longdesc="Red, White, and Blue Boy Scouts of America 100th Anniversary Black Hills Area Council Shoulder Patches" src="../Images/shoulder.png" style="float: right" width="108px"></a><br class="auto-style1">
<span id="bottomLine">&nbsp;Troop 7</span><br></strong></p>
<div id="navigation">
    <ul>
        <li><a href="Home.aspx">
        <img id="img9" alt="Home" fp-style="fp-btn: Metal Tab 1; fp-transparent: 1" fp-title="Home" height="33" onmousedown="FP_swapImg(1,0,/*id*/'img9',/*url*/'../Images/button167.gif')" onmouseout="FP_swapImg(0,0,/*id*/'img9',/*url*/'../Images/button165.gif')" onmouseover="FP_swapImg(1,0,/*id*/'img9',/*url*/'../Images/button166.gif')" onmouseup="FP_swapImg(0,0,/*id*/'img9',/*url*/'../Images/button166.gif')" src="../Images/button165.gif" style="border: 0" width="100"></a>
        </li>
        <li>
        <img id="img1" alt="Scout" fp-style="fp-btn: Metal Tab 1; fp-transparent: 1" fp-title="Scout" height="33" onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'../Images/button133.gif')" onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'../Images/button131.gif')" onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'../Images/button132.gif')" onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'../Images/button132.gif')" src="../Images/button131.gif" style="border: 0" width="100">
        <ul>
            <li><a href="Mission.aspx">Mission</a></li>
            <li><a href="#">Legacy</a></li>
            <li><a href="#">Motto</a></li>
            <li><a href="#">Oath</a></li>
            <li><a href="#">Law</a></li>
            <li><a href="#">Slogan</a></li>
            <li><a href="#">Outdoor Code</a></li>
        </ul>
        </li>
        <li>
        <img id="img2" alt="Troop 7" fp-style="fp-btn: Metal Tab 1; fp-transparent: 1" fp-title="Troop 7" height="33" onmousedown="FP_swapImg(1,0,/*id*/'img2',/*url*/'../Images/button136.gif')" onmouseout="FP_swapImg(0,0,/*id*/'img2',/*url*/'../Images/button134.gif')" onmouseover="FP_swapImg(1,0,/*id*/'img2',/*url*/'../Images/button135.gif')" onmouseup="FP_swapImg(0,0,/*id*/'img2',/*url*/'../Images/button135.gif')" src="../Images/button134.gif" style="border: 0" width="100">
        <ul>
            <li><a href="#">History</a></li>
            <li><a href="#">Meetings</a></li>
            <li><a href="#">Charter Organization</a></li>
            <li><a href="#">Fundraisers</a></li>
            <li><a href="#">Service Projects</a></li>
        </ul>
        </li>
        <li><a href="Calendar.aspx">
        <img id="img3" alt="Calendar" fp-style="fp-btn: Metal Tab 1; fp-transparent: 1" fp-title="Calendar" height="33" onmousedown="FP_swapImg(1,0,/*id*/'img3',/*url*/'../Images/button13A.gif')" onmouseout="FP_swapImg(0,0,/*id*/'img3',/*url*/'../Images/button138.gif')" onmouseover="FP_swapImg(1,0,/*id*/'img3',/*url*/'../Images/button139.gif')" onmouseup="FP_swapImg(0,0,/*id*/'img3',/*url*/'../Images/button139.gif')" src="../Images/button138.gif" style="border: 0" width="100"></a>
        </li>
        <li>
        <img id="img4" alt="Eagles" fp-style="fp-btn: Metal Tab 1; fp-transparent: 1" fp-title="Eagles" height="33" onmousedown="FP_swapImg(1,0,/*id*/'img4',/*url*/'../Images/button13D.gif')" onmouseout="FP_swapImg(0,0,/*id*/'img4',/*url*/'../Images/button13B.gif')" onmouseover="FP_swapImg(1,0,/*id*/'img4',/*url*/'../Images/button13C.gif')" onmouseup="FP_swapImg(0,0,/*id*/'img4',/*url*/'../Images/button13C.gif')" src="../Images/button13B.gif" style="border: 0" width="100">
        </li>
        <li>
        <img id="img5" alt="Photos" fp-style="fp-btn: Metal Tab 1; fp-transparent: 1" fp-title="Photos" height="33" onmousedown="FP_swapImg(1,0,/*id*/'img5',/*url*/'../Images/button140.gif')" onmouseout="FP_swapImg(0,0,/*id*/'img5',/*url*/'../Images/button13E.gif')" onmouseover="FP_swapImg(1,0,/*id*/'img5',/*url*/'../Images/button13F.gif')" onmouseup="FP_swapImg(0,0,/*id*/'img5',/*url*/'../Images/button13F.gif')" src="../Images/button13E.gif" style="border: 0" width="100">
        </li>
        <li>
        <img id="img6" alt="Archives" fp-style="fp-btn: Metal Tab 1; fp-transparent: 1" fp-title="Archives" height="33" onmousedown="FP_swapImg(1,0,/*id*/'img6',/*url*/'../Images/button143.gif')" onmouseout="FP_swapImg(0,0,/*id*/'img6',/*url*/'../Images/button141.gif')" onmouseover="FP_swapImg(1,0,/*id*/'img6',/*url*/'../Images/button142.gif')" onmouseup="FP_swapImg(0,0,/*id*/'img6',/*url*/'../Images/button142.gif')" src="../Images/button141.gif" style="border: 0" width="100">
        </li>
        <li>
        <img id="img7" alt="Contact Us" fp-style="fp-btn: Metal Tab 1; fp-transparent: 1" fp-title="Contact Us" height="33" onmousedown="FP_swapImg(1,0,/*id*/'img7',/*url*/'../Images/button146.gif')" onmouseout="FP_swapImg(0,0,/*id*/'img7',/*url*/'../Images/button144.gif')" onmouseover="FP_swapImg(1,0,/*id*/'img7',/*url*/'../Images/button145.gif')" onmouseup="FP_swapImg(0,0,/*id*/'img7',/*url*/'../Images/button145.gif')" src="../Images/button144.gif" style="border: 0" width="100">
        </li>
        <li>
        <img id="img8" alt="Links" fp-style="fp-btn: Metal Tab 1; fp-transparent: 1" fp-title="Links" height="33" onmousedown="FP_swapImg(1,0,/*id*/'img8',/*url*/'../Images/button14C.gif')" onmouseout="FP_swapImg(0,0,/*id*/'img8',/*url*/'../Images/button14A.gif')" onmouseover="FP_swapImg(1,0,/*id*/'img8',/*url*/'../Images/button14B.gif')" onmouseup="FP_swapImg(0,0,/*id*/'img8',/*url*/'../Images/button14B.gif')" src="../Images/button14A.gif" style="border: 0" width="100"></li>
    </ul>
</div>
</div>
<div id="placeHolder">

<form name="aspnetForm" method="post" action="calendar.aspx" id="aspnetForm">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUIMjY3NTY2NzgPZBYCZg9kFgICBg9kFgICAQ9kFgICAQ9kFgJmD2QWAmYPZBYCZg88KwAKAQAPFgIeC1Zpc2libGVEYXRlBgBYZ/biFdCIZGRkMI8npGs3fM2Dlq8MpuL9LmQlKMM=" />
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['aspnetForm'];
if (!theForm) {
theForm = document.aspnetForm;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
    theForm.__EVENTTARGET.value = eventTarget;
    theForm.__EVENTARGUMENT.value = eventArgument;
    theForm.submit();
}
}
//]]>
</script>


<div>

<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWLQLO4vvyCwL38q3cBQKD2IeFDgLGtujnAgLGttSKCgLGtoDjCALGtuwGAu2d/p8NAu2d6sIEAu2d1uUPAu2dwogHAu2drqwOAu2dmtcBAu2dhvoIAu2d8h0C7Z2e9gYC7Z2KmQ4CwPe+3gQCwPeqgQwCwPeWpAcCwPeCzw4CwPfu8gECwPfalQkCwPfGOALA97LcCwLA9960DgLA98rfAQLn3tzwAgLn3sibCgLn3rS/DQLn3qDiBALn3oyFDALn3vioBwLn3uTTDgLn3tD2AQLn3vzPBALn3ujyDwKovamECgKovZWvDQKovYHSBAKove31DwKovdmYBwKovcXDDgKovbHnAQKovZ2KCWkah32rBjGWasSfsPT6t6Cs3H6A" />
</div>
    <table id="ctl00_content_mainTable" border="0">
<tr>
    <td><table id="ctl00_content_eventCalendar" cellspacing="0" cellpadding="2" rules="all" title="Calendar" border="1" style="width:487px;height:500px;font-weight:bold;font-size:20pt;font-family:Times New Roman;color:Black;border-width:1px;border-style:solid;border-color:Black;background-color:White;border-collapse:collapse;">
        <tr><td colspan="7" style="background-color:Black;height:15pt;">    <table cellspacing="0" border="0" style="color:White;font-family:Times New Roman;font-size:15pt;font-weight:bold;width:100%;border-collapse:collapse;">
            <tr><td style="color:White;font-size:10pt;width:15%;"><a href="javascript:__doPostBack('ctl00$content$eventCalendar','V4839')" style="color:White" title="Go to the previous month">April</a></td><td align="center" style="width:70%;">May 2013</td><td align="right" style="color:White;font-size:10pt;width:15%;"><a href="javascript:__doPostBack('ctl00$content$eventCalendar','V4900')" style="color:White" title="Go to the next month">June</a></td></tr>
        </table></td></tr><tr><th align="center" abbr="Sunday" scope="col" style="color:#333333;background-color:#CCCCCC;font-size:15pt;font-weight:bold;height:10px;">Su</th><th align="center" abbr="Monday" scope="col" style="color:#333333;background-color:#CCCCCC;font-size:15pt;font-weight:bold;height:10px;">Mo</th><th align="center" abbr="Tuesday" scope="col" style="color:#333333;background-color:#CCCCCC;font-size:15pt;font-weight:bold;height:10px;">Tu</th><th align="center" abbr="Wednesday" scope="col" style="color:#333333;background-color:#CCCCCC;font-size:15pt;font-weight:bold;height:10px;">We</th><th align="center" abbr="Thursday" scope="col" style="color:#333333;background-color:#CCCCCC;font-size:15pt;font-weight:bold;height:10px;">Th</th><th align="center" abbr="Friday" scope="col" style="color:#333333;background-color:#CCCCCC;font-size:15pt;font-weight:bold;height:10px;">Fr</th><th align="center" abbr="Saturday" scope="col" style="color:#333333;background-color:#CCCCCC;font-size:15pt;font-weight:bold;height:10px;">Sa</th></tr><tr><td align="center" style="color:#999999;background-color:Black;width:14%;">28</td><td align="center" style="color:#999999;background-color:Black;width:14%;">29</td><td align="center" style="color:#999999;background-color:Black;width:14%;">30</td><td align="center" style="width:14%;">1</td><td align="center" style="width:14%;">2</td><td align="center" style="background-color:Green;width:14%;">3</td><td align="center" style="width:14%;">4</td></tr><tr><td align="center" style="width:14%;">5</td><td align="center" style="background-color:Green;width:14%;">6</td><td align="center" style="width:14%;">7</td><td align="center" style="width:14%;">8</td><td align="center" style="width:14%;">9</td><td align="center" style="width:14%;">10</td><td align="center" style="width:14%;">11</td></tr><tr><td align="center" style="width:14%;">12</td><td align="center" style="width:14%;">13</td><td align="center" style="width:14%;">14</td><td align="center" style="width:14%;">15</td><td align="center" style="width:14%;">16</td><td align="center" style="background-color:Green;width:14%;">17</td><td align="center" style="background-color:Green;width:14%;">18</td></tr><tr><td align="center" style="width:14%;">19</td><td align="center" style="background-color:Green;width:14%;">20</td><td align="center" style="width:14%;">21</td><td align="center" style="width:14%;">22</td><td align="center" style="width:14%;">23</td><td align="center" style="width:14%;">24</td><td align="center" style="width:14%;">25</td></tr><tr><td align="center" style="width:14%;">26</td><td align="center" style="width:14%;">27</td><td align="center" style="width:14%;">28</td><td align="center" style="width:14%;">29</td><td align="center" style="width:14%;">30</td><td align="center" style="width:14%;">31</td><td align="center" style="color:#999999;background-color:Black;width:14%;">1</td></tr><tr><td align="center" style="color:#999999;background-color:Black;width:14%;">2</td><td align="center" style="color:#999999;background-color:Black;width:14%;">3</td><td align="center" style="color:#999999;background-color:Black;width:14%;">4</td><td align="center" style="color:#999999;background-color:Black;width:14%;">5</td><td align="center" style="color:#999999;background-color:Black;width:14%;">6</td><td align="center" style="color:#999999;background-color:Black;width:14%;">7</td><td align="center" style="color:#999999;background-color:Black;width:14%;">8</td></tr>
    </table></td><td><span id="ctl00_content_eventLabel" style="display:inline-block;font-size:15pt;width:500px;">5/3/2013 to 5/5/2013 Spring Camporee<br><b>5/6/2013 Monthly Planning Meeting</b><br>5/17/2013 to 5/19/2013 Order of the Arrow Ordeal<br>5/18/2013 Busy Beaver<br><b>5/20/2013 Court of Honor</b><br></span></td>
</tr>
</table>

</form>

</div>
<div id="address">
&#169;2010-2013 BSA BHAC Troop 7 <b>&#167;</b> Designed by
<a href="mailto:tytus.strube@hotmail.com">Tytus Strube</a> <b>&#167;</b> Produced 
by <a href="mailto:tytus.strube@hotmail.com">Tytus Strube</a> <b>&#167;</b> 
Updated by <a href="mailto:tytus.strube@hotmail.com">Tytus Strube</a> <b>&#167;</b> 
Hosted by <a href="http://www.godaddy.com/" target="main">Go Daddy</a> <b>&#167;</b> 
Last Updated March 9, 2013</div>
</body>
</html>

margin: 0如果我从CSS 中取出*,它会修复显示问题,但会创建一个新问题。它产生的问题是网站在页面顶部有一个空白。为了清楚起见,我正在询问有关如何解决显示问题的任何想法。如果有帮助,该网站由 GoDaddy 托管。任何帮助将不胜感激。

4

1 回答 1

0

问题解决了。显然 GoDaddy 网站默认使用 ASP.NET 2.0/3.0。不得不将其更改为使用 ASP.NET 4.0/4.5。我的电脑运行的是 ASP.NET 4.5。这就解释了为什么它在负载之间看起来如此不同。现在无论我在本地还是在线加载它看起来都一样。谢谢大家的建议。

于 2013-05-23T19:13:33.777 回答