 |

jposwald
User
Mar 27, 2008, 8:00 PM
Post #1 of 6
(317 views)
Shortcut
|
|
CSS problem on Product Listing
|
Can't Post
|
|
Hello, please i need help to figure out this, im not a expert programmer so, i need your advise. I have to list elearning courses, but i have next problem: When i give a cell a class, i do not know why the 2nd course listing do not respect it. I'm sure you will have this easy solution; Link is: http://www.worldwidetrainings.net/products_elearningList.php Please see page's source code to see how i did it. Thank you
|
|
|  |
 |

Dave
Staff
/ Moderator

Mar 28, 2008, 10:20 AM
Post #2 of 6
(306 views)
Shortcut
|
|
Re: [jposwald] CSS problem on Product Listing
[In reply to]
|
Can't Post
|
|
Are you referring to the class "texto-curso_titulo". When I view source I see it's not in the <td> for the second record. Can you attach the viewer file (products_elearningList.php) so I can see the source? Thanks! Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 | |  |
 |

Dave
Staff
/ Moderator

Mar 28, 2008, 10:49 AM
Post #4 of 6
(301 views)
Shortcut
|
|
Re: [jposwald] CSS problem on Product Listing
[In reply to]
|
Can't Post
|
|
Ok thanks, Typically you want to have your starting and ending foreach tags outside of a <td> or <tr> so they create a row for each record. I think what you may want is this:
<?php foreach ($listRows as $record): ?> <tr> <td width="378" height="25" valign="top" class="texto-curso_titulo"> <?php echo $record['name'] ?> </td> <td width="50" valign="top" class="texto-curso_id">ID:</td> <td width="100" valign="top" class="texto-curso_id"><?php echo $record['product_id_sku'] ?> </td> </tr> <tr> <td height="25" valign="top" class="texto-curso_fecha"><?php echo date("D, M jS, Y g:i:s a", strtotime($record['date'])) ?> <!-- For date formatting codes see: http://www.php.net/date --> </td> <td valign="top" class="texto-curso_precio">Precio:</td> <td valign="top" class="texto-curso_precio"><?php echo $record['price'] ?> </td> </tr> <tr> <td height="28" colspan="3" valign="top" class="texto-curso_intro"><?php echo $record['summary'] ?></td> </tr> <tr> <td height="25" colspan="3" valign="top" class="texto-curso_link"><a href="<?php echo $record['_link'] ?>"><?php echo $record['_link'] ?></a></td> </tr> <tr> <td height="20" colspan="3" valign="top"> <hr align="center" size="2" noshade="noshade"/></td> </tr> <?php endforeach ?> Also, try turning on the border for your table, I think it will help with debugging. Give that a try and let me know if you get any closer. Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 | |  |
 |

Dave
Staff
/ Moderator

Mar 28, 2008, 11:17 AM
Post #6 of 6
(297 views)
Shortcut
|
|
Re: [jposwald] CSS problem on Product Listing
[In reply to]
|
Can't Post
|
|
No problem, just use utf-8 as character encoding. Everything else should still display fine as well. Change this at the top of your page:
<?xml version="1.0" encoding="UTF-8"?><html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> Hope that helps! Dave Edis - Senior Developer interactivetools.com
|
|
|  |
|