我正在我的代码中运行存储过程,我想要实现的是一个在页面左侧有一个大图像,然后在右边有4-5个较小图像的表。我先设置较大的图像,然后再运行较小的图像。我的问题是图像的对齐。较小的图像不想正确堆叠,然后下一个较大和较小图像的rom正在倾斜。请参阅下面的代码。
Dim table1 As New HtmlTable
Dim numells As Integer = 6
dv = New DataView(dt1.Tables(0))
Dim tablestring = ""
Dim strTable As New StringBuilder()
Dim rowIsOpen As Boolean = False
Dim itmCounter As Integer = 0
strTable.Append("<div class=table3test>")
For Each dr As DataRowView In dv
Dim crossover As String = dr("ID").ToString()
Dim picid As String = dr("StyleName").ToString()
Dim picdescrip As String = dr("StyleNumber").ToString().ToUpper()
Dim collectionname As String = dr("Collection").ToString()
Dim designinfo As String = dr("GroupName").ToString()
Dim mainimage As String = dr("RoomScene").ToString
Session("Collection") = collectionname
If itmCounter = 0 Then
If mainimage = "Yes" Then
strTable.Append("" & collectionname & " Collection</br>")
strTable.Append("<div class=celltest7><a class=hyperlink href=""Sheet-Vinyl-Tile-Product-Page.aspx?p=" & crossover & "&o=" & designinfo & """>")
strTable.Append("<img src=""Images/Main/" + picdescrip + " " + picid + ".jpg""width=""400"" height=""400"" border=""0"""" /><br/>")
strTable.Append("<div class=backgroundcolor>" & picdescrip + " " + collectionname & "")
strTable.Append("</a></div></div>")
Else
End If
End If
`enter code here` If itmCounter <> 0 Then
If testtable <> collectionname Then
strTable.Append("</br></br>")
If mainimage = "Yes" Then
strTable.Append("" & collectionname & " Collection</br>")
strTable.Append("<div class=celltest7><a class=hyperlink href=""Sheet-Vinyl-Tile-Product-Page.aspx?p=" & crossover & "&o=" & designinfo & """>")
strTable.Append("<img src=""Images/Main/" + picdescrip + " " + picid + ".jpg""width=""400"" height=""400"" border=""0"""" /><br/>")
strTable.Append("<div class=backgroundcolor>" & picdescrip + " " + collectionname & "")
strTable.Append("</a></div></div>")
Else
End If
Else
End If
End If
If itmCounter Mod 3 = 0 Then
rowIsOpen = True
End If
strTable.Append("<div class=celltestpublic1><div class=celltestpublic><a class=hyperlink href=""Sheet-Vinyl-Tile-Product-Page.aspx?p=" & crossover & "&o=" & designinfo & """>")
strTable.Append("<img src=""Images/Swatches/" + picdescrip + " " + picid + ".jpg""width=""200"" height=""200"" border=""0"""" /><br/></div>")
strTable.Append("<div class=backgroundcolor>" & picdescrip + " " + collectionname & "")
strTable.Append("</a></div></div>")
itmCounter += 1
testtable = Session("Collection")
Next
strTable.Append("</div>")
product.InnerHtml = strTable.ToString()
con5.Close()
CSS
.celltest7 {
width: 30%;
float: left;
margin-right: 20px;
margin-bottom: 40px;
border: 8px solid white;
box-shadow: 0px 0px 5px #888888;
}
.celltestpublic {
width: 70%;
}
.celltestpublic1
{
float: left;
width: 200px;
margin-right: 10px;
/*margin-bottom: 15px;*/
}
.table3test
{
width: 100%;
}