标题标记下的第一个链接是不可点击的
问题描述:
我遇到了一个经典的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>
答
这是起因于一个 标签重叠第一格。这最初是为了在div和这个div之间提供一个缓冲区,但是这个被删除了,并且添加了填充。
你可以右键单击“Forms”并选择“Inspect”,然后向我们展示CSS的样子? –
嗨@Scott,谢天谢地解决了这个问题。我会更新这篇文章。 –
很高兴你有它的工作。 –