Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Formatting ASP results using float and CSS

Featured Replies

I’m trying to format my output from a MS Access database. I’m using ASP to retrieve the results from the database and CSS to format the output.

 

The results contain a thumbnail image that can be enlarged. I would like to alternate these results so that the image is on the right for result 1, left for result 2, right for 3 and so forth.

 

Currently I have the images all floated to the right. This works fine, however it’s not the desired result.

 

A preview can been seen at http://www.bigchetti.com/camelot/larin.asp

 

The formatting code is:

 

<div class="maincontent">

<%Set MyConn = Server.CreateObject("ADODB.Connection")

MdbFilePath = Server.MapPath("Databases/camelot.mdb")

MyConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath & ";"

SQL_query = "SELECT * FROM ProdCamelot WHERE ProdID >=0 AND ProdCategory = 'inflatable'"

 

Set RS = MyConn.Execute(SQL_query)

 

WHILE NOT RS.EOF

%>

 

<h3><%=RS("ProdNme")%></h3>

<a href="ProdImage/<%=RS("ProdImge")%>"><img border="0" src="ProdImage/<%=RS("ProdImge")%>" width="190" height="150" alt="" class="floatRight"></a>

<p><%=RS("ProdDsc")%></p>

<p>Price:<%response.write FormatCurrency(RS("ProdCost")) %></p>

 

 

<%

RS.MoveNext

WEND

%>

 

 

</div>

 

If anyone has any ideas your feedback would be appreciated.

Thanks.

  • Author

Problem has been solved. No need to add more divs. The problem was in the ASP code. I needed to add some variables, a counter and an IF else statement.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.