hello forum,
I have much to learn with CSS & html. this is probably a common issue but I've been fighting with it all morning. hoping someone here will be kind enough to educate me please.
when TD contains a very long string Firefox wraps it keeping everything within the TD box.
when TD contains a very long string IE does not wrap it, and everything after (subsequent TDs, the rest of TR) is pushed out way beyond the table's borders.
I'm really stuck and just being pointed in the right direction would be a great help & truly appreciated!
the code:
Code:<div class="block"> <table class=""> <tr> <th>Site Name</th> <th>Address</th> <th>Category</th> </tr> <? $contact_result = query_contacts( $where_clause ); $even = true; while( $contact_row = details_from_contact_row( $contact_result ) ) { if( $even ) { $class = ""; } else { $class = "_grey"; } print " <tr>\n"; $id = $contact_row['ID']; $name = $contact_row['firstName']." ".$contact_row['lastName']; if( !trim( $name ) ) { $name = "[blank name]"; } $dob = process_date($contact_row['dob']); $addr = array( $contact_row['line1'], $contact_row['line2'], $contact_row['city'], $contact_row['county'], $contact_row['postcode'] ); $address = concat( $addr ); if( $address ) { $address .= ". "; } $address .= "<br />".$contact_row['country']; if( !$address ) { $address = "<br />"; } $telephone = $contact_row['telephone'];if(!$telephone){$telephone="<br />"; } $mobile = $contact_row['mobile']; if( !$mobile ) { $mobile = "<br />"; } $email = $contact_row['email']; if( !$email ) { $email = "<br />"; } $category = $contact_row['category'];if(!$category){$category = "<br />"; } print " <td class='noborder$class'><a href='persondetails.php?id=$id'>$name</a></td>\n"; // print " <td class='noborder$class'>$dob</td>"; // print " <td class='noborder$class'>$address</td>\n"; // print " <td class='noborder$class'>$telephone</td>\n"; // print " <td class='noborder$class'>$mobile</td>\n"; print " <td class='noborder$class'><a href='http://$email' target= '_blank'>$email</a></td>\n"; print " <td class='noborder$class'>$category</td>\n"; print " </tr>\n"; $even = !$even; } ?> </table> </div> CSS code: body { width: 600px; font-family: verdana, arial, helvetica, helv, sans-serif; font-size: 12; background: #CAE0FF; } h1 { border: 1px solid black; background-color: #EAFFFF; margin: 0px; padding: 5px; font-size: medium; color: #444444; } h2 { font-size: 12; font-style: italic; margin: 0px; padding-left: 10px; padding-bottom: 5px; } form { margin: 0px; } a { text-decoration: none; color: #770000; font-size: 12; } a:hover { color: #ff0000; } a.menu { color: #770000; font-size: 12; } a.menu:hover { color: #ff0000; } input.norm { width: 100%; } input.main { width: 100%; background-color: #e7ffe7; } input.delete { background-color: #ff9999; font-size: 110%; } input.submit { font-size: 110%; } input.delete_small { background-color: #ff9999; } input.submit_small { } select.norm { width: 100%; height: 100%; } textarea { width: 100%; } td.checkbox { text-align: center; border: 0px; } tr { width: 500px; } td { padding: 2px 5px; margin: 0px; font-size: 12; } td.centre { text-align: center; } td.checkbox_grey { text-align: center; border: 0px; background-color: #f3f3f3; } td.noborder_grey { border: 0px; background-color: #f3f3f3; } th { padding: 2px 10px; background-color: #f3f3f3; } th.left { text-align: left; } div.block { border-left: 1px solid black; border-right: 1px solid black; border-bottom: 1px solid black; border-top: 0px; padding: 10px; font-size: 12; } div.block_no_print { border-left: 1px solid black; border-right: 1px solid black; border-bottom: 1px solid black; border-top: 0px; padding: 10px; } div.main_address { font-style: italic; font-size: 12; } address.menu { background-color: #fffff0; border-left: 1px solid black; border-right: 1px solid black; border-bottom: 1px solid black; border-top: 0px; padding: 5px; font-style: normal; font-size: 12; } address.search { background-color: #f0f0ff; border-left: 1px solid black; border-right: 1px solid black; border-bottom: 1px solid black; border-top: 0px; padding: 5px; font-style: normal; font-size: 12; margin: 0px; } address.statusbar { background-color: #eeeeee; border: 1px solid black; padding: 5px; font-style: normal; font-size: 12; } address.vanity { font-size: x-small; font-style: normal; text-align: right; padding: 5px; font-size: 12; } span.menu { border-right: 1px solid black; height: 100%; padding: 0px 6px; font-size: 12; } h2: { padding-top: 0px; }





. We will need the generated source from that code (hit View>Source in your browser and paste it here)

Bookmarks