0
我遇到了一個經典的ASP VBScript頁面,這個頁面開始出現問題。記錄我不是一個網頁設計師,我正在編寫別人的代碼。標題標記下的第一個鏈接是不可點擊的
我有一個奇怪的問題,直接出現在標題下的第一組鏈接不能被點擊,但在第一行之後可以。我認爲這是頁面上重疊元素的某種問題,但是,唉,在解決這個問題2個小時之後,答案就不存在了。
下面的例子來自創建標題的循環(第一個循環)。任何關於這種情況的想法都會很棒。
由於
<div id="folderWrapper" style="width:100%; text-align:left; display:inline; float:left;">
<!-- Loop through the folders in the specific directories to find all that start with a "_" (where documents are stored) -->
<%
dim fs,fo,x
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder(server.MapPath(department))
for each x in fo.SubFolders
%>
<%If Left(x.Name, 1) = "_" Then%>
<!-- Run the loop against only folders with the appendix of "_" as these are the folders with the files in.-->
<div id="folderDiv" style="width:100%; text-align:left; display:inline; float:left; padding-right:10px;">
<!-- Create headers for each folder-->
<h6><%Response.Write(Right(x.Name,len(x.Name)-1))%></h6>
<%
' Loop through files in folder
dim fs2,fo2,x2
set fs2=Server.CreateObject("Scripting.FileSystemObject")
set fo2=fs2.GetFolder(x)
for each x2 in fo2.files
' Set fileType variable depending upon the left 4 or 5 chars.
dim fileType
If (Right(x2.Name,4)=".doc") or (Right(x2.Name,4)=".pdf") Then
fileType = Right(x2.Name,4)
End If
If (Right(x2.Name,5)=".docx") Then
fileType = Right(x2.Name,5)
End If
%>
<!-- DIV to contain the files and display the correct icon for .doc/.docx and .pdf files-->
<div id="fileDiv" style="width:450px; float:left; display:inline; margin-left:10px; background-image:url(../images/<%if (right(x2.Name,4) = ".doc") or (right(x2.Name,4) = "docx") then %>Word_Icon.gif <%end if%> <%if(right(x2.Name,4) = ".pdf") then %>PDF_Icon.gif <% end if %>); background-position:left; background-repeat:no-repeat; padding:10px 10px 10px 25px;" >
<%If fileType <> ".db" Then%>
<!-- If to deal with .doc and .pdf files (removes the .doc/.pdf extensions from the name when displayed on the page)-->
<%If (fileType=".doc") or (fileType=".pdf") Then%>
<a href="./<%Response.Write(department) %>/<%=x.Name%>/<%=x2.Name%>" target="Form"><%=left(x2.Name,len(x2.Name)-4)%></a>
<%End If%>
<!-- If to deal with .docx files (removes the .docx extensions from the name when displayed on the page)-->
<%If (fileType=".docx") Then %>
<a href="./<%Response.Write(department)%>/<%=x.Name%>/<%=x2.Name%>" target="Form"><%=left(x2.Name,len(x2.Name)-5)%></a>
<%End If%>
<%End If%>
</div>
<%next
set fo=nothing
set fs=nothing%>
<p> </p>
<p> </p>
</div>
<%End If%>
<%next
set fo=nothing
set fs=nothing%>
</div>
你可以右鍵單擊「Forms」並選擇「Inspect」,然後向我們展示CSS的樣子? –
嗨@Scott,謝天謝地解決了這個問題。我會更新這篇文章。 –
很高興你有它的工作。 –