473,388 Members | 1,346 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Product display PROBLEM with PHP + CSS

Hello,
I have the folowing code looping thru a result set from the Database and
displaying a list of products.
I want to use CSS to display 3 products for each line ... or any number of
products that will fit in a line and look nice.
So from the php side How can I do something for every 3 records e.x every 3
records echo "<ul>".

Without any CSS it will display them vertically....

/************************************************** */
echo "<ul>";
while ($row_newProd=mysql_fetch_assoc($new_products))
{?>

<li>
<?php echo $row_newProd['products_shrt_desc']; ?><br>
<div align="center"><a href="index.php?products_id=<?php echo
$row_newProd['products_id']; ?>"><img src="/images/thumb_<?php echo
$row_newProd['products_img']; ?>" border="0" ></a></div>
<p><?php
display_product_price($row_newProd['products_price'],$row_newProd['products_offer']);
?></p>
</li>

<? }
echo "</ul>";

/************************/
css:

#new_products ul {
margin:0px;
list-style-type: none;
text-align:center;
padding: 0px;
}
#new_products ul li {
font-size:0.8em;
display:inline;
float:left;
/*border: 1px dashed #CCCCFF;*/
width:30%;
margin:2px;
}
/**************************************/

If you've done something like that, you know what I mean.
So if you have any Idea give me a hint please.

Regards
Angelos.
Sep 5 '05 #1
0 1542

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: dtsearch | last post by:
Press Contact: Belinda Banks S&S Public Relations (212) 946-2823 Belinda@sspr.com Announcing New dtSearch® Product Line Version Release Enhances Indexing, Searching and Display of MS Word,...
0
by: dtsearch | last post by:
Announcing dtSearch® Product Line Release With New Terabyte Indexer New Version Can Index Over a Terabyte of Text in a Single Index, With Indexed Search Time Typically Under a Second BETHESDA,...
2
by: Eddie Stone | last post by:
I've been tasked to produce some system wherby affiliates can display our products on their website. At the moment affiliates are simply mirroring the site and there is no organisation. I said I...
2
by: campbellbrian2001 | last post by:
Thanks All, I have a vb.net desktop application form from which a user chooses a product code from a database (Access97) using a comboBox. Each record of the database has a field giving the...
2
by: monomaniac21 | last post by:
Hi i want to display the price of a product on my site in multiple currencies that is constantly updated to keep in line with exchange rate fluctuations can anyone tell me how i could get access to...
6
ak1dnar
by: ak1dnar | last post by:
Hi, I am developing a PHP web site that uses a search tool in it. I’ll brief it like this, In the form user will first select Type of the computer (Laptop, desktop or all), then user will select...
1
by: ryguy0320 | last post by:
Hello I am fairly new to VB and needed help with the following; You will create a single windows form based application that allows you to add a new Products to the database. In addition to...
1
by: gauravpadia | last post by:
how to display product 360 degree view and 3D view on a products website?
0
by: David Troxell - Encourager Software | last post by:
Product Scope 7 (http://www.encouragersoftware.com/) and Profile Exchanges enhanced with SetupCast publishing methods NOTE: If you are a software author, releasing commercial and/or shareware...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.