After diving into Bootstrap, I encountered an issue with the layout generated by a VB.NET page using StringBuilder. The result was a disorganized mess:
Upon further inspection, it became evident that the problem extended to other sections of the page as well. It appears that Bootstrap struggles when dealing with items of varying sizes.
Below is the relevant code snippet:
sb.Append("<div class=""row""><div class=""col-md-12""><img src=""http://placehold.it/1000x225"" /></div><!-- col-md-12--></div><!-- row -->")
sb.Append("<div class=""row thuumbnails"">")
If dr.HasRows Then
Do While dr.Read
sb.Append("<div class=""col-md-2"">")
sb.Append("<div class=""img-thumbnail"">")
sb.Append("<a href=""#"" class=""thumbnail""><img src=""http://placehold.it/100x100"" /></a><h4 class=""thumbnail caption"">" & dr.Item("PrdName") & "</h4>")
sb.Append("<center>" & dr.Item("PrdCode") & "</center><br />")
sb.Append("<center>Price: " & dr.Item("PrdPrice") & " MSRP: " & dr.Item("PrdMSRP") & "</center>")
sb.Append("</div><!-- thumbnail --></div><!-- col-md-2 -->")
Loop
sb.Append("</div><!-- row -->")
Else
' No data returned so send a message to the front end
sb.Append("<div class=""col-md-12""><div class=""warning"">There were no categories to display!</div><!-- col-md-12 --></div><!-- warning -->")
End If
All the CSS follows basic Bootstrap guidelines. Can anyone shed light on why this issue is occurring and suggest a solution? Thank you!