Jump to content

gregaryb

Members
  • Posts

    46
  • Joined

  • Last visited

Everything posted by gregaryb

  1. I did see that but same problem......can't find any sample code that does not generate an error along the lines that it can't find PHPmailer. Is PHPMailer native to php or is it something additional you have to install or enable on the back end.....in one's CPanel?
  2. I give up in frustration! I need some sample code to send an email with an attachment, using the function mail(...), that does not generate this error message: Error with PHP mail(): Multiple or malformed newlines found in additional_header
  3. I have done this with text file before but I can't gt it to work with a binary file. I am trying to send a .xls file and this is what I am getting when I open up the file attachment in MS Excel: UEsDBBQAAAAIACtT8ERHkkSyWAEAAPAEAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbK2UTU7DMBCF 95wi8hYlblkghJp2QWEJlSgHMPakserYlmf6d3smaQsIiUDVbmJF9nvf+Hns0WTbuGwNCW3wpRgW A5GB18FYvyjF2/wpvxMZkvJGueChFDtAMRlfjea7CJix2GMpaqJ4LyXqGhqFRYjgeaYKqVHEv2kh o9JLtQB5MxjcSh08gaecWg8xHr0wP1kD2UwlelYNY+TWSWI32H+HBfuJ7GEvbNmlUDE6qxVx4XLt zQ9qHqrKajBBrxqWFJ3NdesifwUi7Rzg2SiMCZTBGoAaV+xNj+QpVGrlKHvcsvs+8wQOT+MdwixY 2a3B2sY+Qv+GftetzwyC9dOkNtxKPaFvQlq+h7C8dOztWDTK+r5DZ/EshYiSUWcXAG1yBkwe2RIS 2a9j72XrkOB0+LEJWvU/iYe0u2hQdsPwwrF/+v911WqVwLxS4ua4+I377n2sQ3YP1vgDUEsDBBQA AAAIACtT8EQXtjc46QAAAEsCAAALAAAAX3JlbHMvLnJlbHOtks1qwzAMgO97CqN7o7SFMUadXsqg tzKyB9Bs5YcklrG9LX37eYexBbrSw46WpU+fhHb7eRrVO4fYi9OwLkpQ7IzY3rUaXuqn1QOomMhZ GsWxhjNH2Fd3u2ceKeWa2PU+qgxxUUOXkn9EjKbjiWIhnl3+aSRMlPIztOjJDNQybsryHsNvBlQL pjpaDeFot6Dqs+db2NI0veGDmLeJXbrQAnlO7CzblQ+5PqQ+D6NqCi0nDVbMKYcjkvdFRgNeNtrc bvT3tDhxIkuJ0Ejg6z5fGdeE1v+5omXGj8084oeE4VVk+HbBxQ1Un1BLAwQUAAAACAArU/BEhCSx VukAAAC5AgAAGgAAAHhsL19yZWxzL3dvcmtib29rLnhtbC5yZWxzrZLBasMwEETv/Qqx91p2Wkop kXMpgVxb9wOEtLZMbEloN23991UbSBwIoQefxKzYmcdI6833OIhPTNQHr6AqShDoTbC97xR8NNv7 Here is my code: $strEmailBody = "<html><body><table border="0" width="800px" cellspacing="0" cellpadding="0">". " <tr>". " <td width="25%" rowspan="5" valign="middle" style="border-style:solid;border-width:thin;border-color:#000000;">". " <p align="right"><b>BILLING DETAILS:</b></td>". " <td colspan="3" style="border-style:solid solid none none;border-width:thin;border-color:#000000;padding-left:5px;" align="left">".$_SESSION["GivenNames"]." ".$_SESSION["Surname"]."</td>". " </tr>". " <tr>". " <td colspan="3" style="border-style:none solid none none;border-width:thin;border-color:#000000;padding-left:5px;" align="left">".$_SESSION["Address"]."</td>". " </tr>". " <tr>". " <td width="9%" align="right">". " <b>Phone:</b></td>". " <td colspan="2" style="border-style:none solid none none;border-width:thin;border-color:#000000;" align="left">".$_SESSION["Phone"]."</td>". " </tr>". " <tr>". " <td width="9%" align="right">". " <b>Mobile:</b></td>". " <td colspan="2" style="border-style:none solid none none;border-width:thin;border-color:#000000;" align="left">".$_SESSION["Mobile"]."</td>". " </tr>". " <tr>". " <td width="9%" align="right" style="border-style:none none solid none;border-width:thin;border-color:#000000;">". " <b>Email:</b></td>". " <td colspan="2" style="border-style:none solid solid none;border-width:thin;border-color:#000000;" align="left">".$_SESSION["Email"]."</td>". " </tr>". "</table>". "<br>". "<table border="0" width="800px" cellspacing="0" cellpadding="0">". " <tr>". " <td width="25%" rowspan="5" align="right" valign="middle" style="border-style:solid;border-width:thin;border-color:#000000;">". " <b>DELIVERY DETAILS:</b></td>". " <td colspan="3" style="border-style:solid solid none none;border-width:thin;border-color:#000000;padding-left:5px;" align="left">".$_SESSION["RecGivenNames"]." ".$_SESSION["RecSurname"]."</td>". " </tr>". " <tr>". " <td colspan="3" style="border-style:none solid none none;border-width:thin;border-color:#000000;padding-left:5px;" align="left">".$_SESSION["RecAddress"]."</td>". " </tr>". " <tr>". " <td width="9%" align="right">". " <b>Phone:</b></td>". " <td colspan="2" style="border-style:none solid none none;border-width:thin;border-color:#000000;" align="left">".$_SESSION["RecPhone"]."</td>". " </tr>". " <tr>". " <td width="9%" height="24" align="right">". " <b>Mobile:</b></td>". " <td colspan="2" style="border-style:none solid none none;border-width:thin;border-color:#000000;" height="24" align="left">".$_SESSION["RecMobile"]."</td>". " </tr>". " <tr>". " <td width="9%" align="right" style="border-style:none none solid none;border-width:thin;border-color:#000000;">". " <b>Email:</b></td>". " <td colspan="2" style="border-style:none solid solid none;border-width:thin;border-color:#000000;" align="left">".$_SESSION["RecEmail"]."</td>". " </tr>". "</table>". "<br>". "<table border="0" width="800px" cellspacing="0" cellpadding="0" bordercolor="#000000">". " <tr>". " <td width="49%" align="left" style="border-style:solid none solid solid;border-width:thin;border-color:#000000;"><b>ITEM DESCRIPTION</b></td>". " <td width="17%" align="right" style="border-style:solid none solid solid;border-width:thin;border-color:#000000;">". " <b>UNIT PRICE</b></td>". " <td width="17%" align="right" style="border-style:solid none solid solid;border-width:thin;border-color:#000000;">". " <b>QUANTITY</b></td>". " <td width="17%" align="right" style="border-style:solid solid solid solid;border-width:thin;border-color:#000000;">". " <b>SUB_TOTAL</b></td>". " </tr>". $fTotal = 0; for ($nI = 0; $nI < count($_SESSION["arrayShoppingCart"]); $nI++) { $arrayCartItem = $_SESSION["arrayShoppingCart"][$nI]; $nCategoryIndex = $arrayCartItem["CategoryIndex"]; $strCategory = $_SESSION["arrayCategories"][$nCategoryIndex][0]; $nInventoryIndex = $arrayCartItem["ItemIndex"]; $arrayInventoryItem = $_SESSION["arrayInventory"][$strCategory][$nInventoryIndex]; $strEmailBody .= " <tr>". " <td width="44%" style="border-style:none none none solid;border-width:thin;border-color:#000000;">".$arrayInventoryItem["Description"]."</td>". " <td width="16%" align="right" style="border-style:none none none solid;border-width:thin;border-color:#000000;">".sprintf("$%.2f", $arrayInventoryItem["Price"])."</td>". " <td width="16%" align="right" style="border-style:none none none solid;border-width:thin;border-color:#000000;">".$arrayCartItem["Quantity"]."</td>". " <td width="16%" align="right" style="border-style:none solid none solid;border-width:thin;border-color:#000000;">".sprintf("$%.2f", $arrayInventoryItem["Price"] * $arrayCartItem["Quantity"])."</td>". " </tr>"; $fTotal += $arrayInventoryItem["Price"] * $arrayCartItem["Quantity"]; } $strEmailBody .= " <tr>". " <td width="76%" align="right" colspan="3" style="border-style:solid solid none solid;border-width:thin;border-color:#000000;">". " <b>SUB-TOTAL</b></td>". " <td width="16%" align="right" style="border-style:solid solid none solid;border-width:thin;border-color:#000000;">".sprintf("$%.2f", $fTotal)."</td>". " </tr>". " <tr>". " <td width="76%" align="right" colspan="3" style="border-style:solid solid none solid;border-width:thin;border-color:#000000;">". " <b>POSTAGE & HANDLING</b></td>". " <td width="16%" align="right" style="border-style:solid solid none solid;border-width:thin;border-color:#000000;">".sprintf("$%.2f", $_SESSION["PostageHandling"])."</td>". " </tr>". " <tr>". " <td width="76%" colspan="3" align="right" style="border-style:solid solid solid solid;border-width:thin;border-color:#000000;"><b>TOTAL</b></td>". " <td width="16%" align="right" style="border-style:solid solid solid none;border-width:thin;border-color:#000000;">".sprintf("$%.2f", $fTotal + $_SESSION["PostageHandling"])."</td>". " </tr>". "</table></body></html>"; mail($_SESSION["BusinessEmail"], "Order from ".$_SESSION["BusinessName"], $strEmailBody, getHeader($strEmailBody)); } Function getHeader(...) function getHeader($strEmailBody) { // Get a random 32 bit number using time() as seed. $nRandNum = md5(uniqid(time())); $strEmailHeader = "From: ".$_SESSION["GivenNames"]." ".$_SESSION["Surname"]." <".$_SESSION["Email"].">rn"; $strEmailHeader .= "Reply-To: ".$_SESSION["Email"]."rn"; $strEmailHeader .= "MIME-Version: 1.0rn"; $strEmailHeader .= "Content-Type: multipart/mixed; boundary="".$nRandNum.""rnrn"; $strEmailHeader .= "This is a multi-part message in MIME format.rn"; $strEmailHeader .= "--".$nRandNum."rn"; $strEmailHeader .= "Content-type:text/html; charset=UTF-8rn"; $strEmailHeader .= $strEmailBody."rnrn"; $strEmailHeader .= "--".$nRandNum."rn"; $strEmailHeader .= "Content-Type: application/octet-stream; name="Invoice.xlsx"rn"; // use different content types here $strEmailHeader .= "Content-Transfer-Encoding: 7bitrn"; $strEmailHeader .= "Content-Disposition: attachment; filename="Invoice.xls"rnrn"; $strEmailHeader .= getInvFileData($_SESSION["Surname"])."rnrn"; $strEmailHeader .= "--".$nRandNum."--"; return $strEmailHeader; } Function getInvFileData(...) function getInvFileData($strSurname) { $strInvFileName = "Invoice_".$strSurname.".xls"; echo "/*"; if (copy("BlankInvoice.xls", $strInvFileName)) { echo "*/r"; try { $objPHPExcel = PHPExcel_IOFactory::load($strInvFileName); $objPHPExcel->setActiveSheetIndexByName("Invoice"); } catch(Exception $e) { die('Error loading file "'.pathinfo($strInvFileName, PATHINFO_BASENAME).'": '.$e->getMessage()); } addInvDetails($objPHPExcel->getActiveSheet()); $objPHPExcelWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, "Excel2007"); $objPHPExcelWriter->save($strInvFileName); $_SESSION["BUFFER"] = file_get_contents($strInvFileName); $_SESSION["BUFFER_SIZE"] = filesize($strInvFileName); //unlink($strInvFileName); } else { echo "*/r"; echo "document.write("<p><font size='10'>ERROR: 'BlankInvoice.xls' could not be found...</font></p><br>");r"; } return chunk_split(base64_encode($_SESSION["BUFFER"])); }
  4. No I didn't spot that reply but thanks anyway. After a short stint writing some user documentation (as a programmer), at my last IT job some years ago, I realised why programmers generally make such poor manual writers. I had to totally change my mindset in order to make the documentation of any use to the testers. The Paypal developer website epitomises 'programmer' designed documentation unfortunately...
  5. For something that is now, in hindsight, very simple to implement, all this namespace business seems, to me, to be completely unnecessary layers of complexity.
  6. This (in written form) is what paypal needs to put on their developer website: https://www.youtube.com/watch?v=t_7GA1BZXPs This makes sense to me, and now I have an understanding of how the whole express checkout process works. But it wasn't easy to find and only after several very frustrating blind attempts with other sdk and class packages from github. After this Paypals details on key/value pairs now means something to me. Hope it helps others who are experiencing the same frustration that I have had to endure over the past week.
  7. For christ sake can some one PLEASE point me in the direction of SIMPLE paypal integration system that DOES NOT require bloody Composer, or any other irritating baggage. And that does not have components scattered across GitHub in multiple zip files. And that can be used via one SIMPLE include statement. I found this https://github.com/paypal/rest-api-sdk-php. Great! Except that it uses PHP "uses" statements and my web server's version of PHP apparently does not support it. So I proceeded to replace all the "uses' statements with explicit "requires" statements so that I don't have to use Composer. Which I find impossible to figure out how to use properly. And I simply don't want to have to use it because it adds unnecessary layers of complexity when a simple include or requires statement would suffice. I then discovered this problem in all the files in the folder "Api". All the files contain this at the top: use PayPalCommonPPModel;use PayPalRestApiContext; I found "RestApiContext" in the file "RestApiContext.php" - no problem. But where the buggery is "CommonPPModel" - its not included in the zip file. WHY the ###### would you not include this in the zip file given that it is in a requires statement? And where the ###### is it?
  8. https://getcomposer.org/doc/01-basic-usage.md Where do you type one of these? curl -sS https://getcomposer.org/installer | php or if you don't have curl php -r "readfile('https://getcomposer.org/installer');" | php In the top of a web page between <?php ?>? In your web hosting service account login some where?
  9. I worked out a javascript solution but I can't figure out how to do it with just CSS. <nav class="navigation"> <ul class="NavMenu"> <li class="NavMenuItem"><a href="index.php">Home</a></li> <li class="NavMenuItem"><a href="CompanyProfile.php">Company Profile</a></li> <li class="NavMenuItem"><a href="Contact.php">Contact Details</a></li> <li class="NavMenuItem"><a href="Store.php">Store</a> <div class="NavMenuItemArrow"><a href="#" id="NavMenuItemArrow" onclick="doOnClick('NavMenuItemArrow', 'NavSubmenu')">▼</a> <ul class="NavSubmenu" id="NavSubmenu"> <li class="NavMenuItem"><a href="Category1.php">Comparators</a></li> <li class="NavMenuItem"><a href="Category2.php">LDR</a></li> <li class="NavMenuItem"><a href="Category3.php">LED</a></li> <li class="NavMenuItem"><a href="Category4.php">Operational Amplifiers</a></li> <li class="NavMenuItem"><a href="Category5.php">Phototransistor</a></li> <li class="NavMenuItem"><a href="Category6.php">Potentiometer</a></li> <li class="NavMenuItem"><a href="Category7.php">Rectifier Diodes</a></li> <li class="NavMenuItem"><a href="Category8.php">Resistor</a></li> <li class="NavMenuItem"><a href="Category9.php">Schottky Diodes</a></li> <li class="NavMenuItem"><a href="Category10.php">Transitors NPN</a></li> <li class="NavMenuItem"><a href="Category11.php">Transistors PNP</a></li> <li class="NavMenuItem"><a href="Category12.php">Zener Diodes</a></li> </ul> </div> </li> </ul> <div id="Gap" style="display:none;"> <?php for ($nI = 0; $nI < count($_SESSION["arrayCategories"]); $nI++) echo "<p> </p>r"; ?> </div> <div class="NavImage" id="NavImg1"> <img width="100%" alt="Navigation image 1" src="images/NavigationImage1.jpg" /> </div> <div class="NavImage" id="NavImg2"> <img width="100%" alt="Navigation image 2" src="images/NavigationImage2.jpg" /> </div></nav><script type="text/javascript"> function doOnClick(strArrowLinkID, strSubmenuID) { var ArrowLinkField = document.getElementById(strArrowLinkID); var Submenu = document.getElementById(strSubmenuID); var Gap = document.getElementById("Gap"); var Content = document.getElementById("content"); var strText = ArrowLinkField.innerHTML; var strDown = String.fromCharCode(0x25BC); var strUp = String.fromCharCode(0x25B2); if (strText == strDown) { ArrowLinkField.innerHTML = strUp; Submenu.style = "display:block;position:relative;"; Gap.style = "display:block;position:relative;"; Content.style.height = "<?php echo $nContainerMinHeight + (count($_SESSION["arrayCategories"]) * $nButtonHeight * 1.5); ?>px"; } else { ArrowLinkField.innerHTML = strDown; Submenu.style = "display:none;"; Gap.style = "display:none;"; Content.style.height = "<?php echo $nContainerMinHeight; ?>px"; } } </script>
  10. See attached images. Or here is the website if you want to play with it: http://www.gregsindigenouslandscapes.com.au/EasyWebStore/index.php# It may make it a little easier to view the source without the PHP. I have a nav menu on the left where one of the items has a little arrow. When you click the arrow a popup menu appears below it. If you click it again the popup menu disappears. The problem is the popup menu is displaying over the top of an image below the nav menu. I would prefer it to push the images down but I can't figure out how to do this. HTML <nav class="navigation"> <ul class="NavMenu"> <li class="NavMenuItem"><a href="index.php">Home</a></li> <li class="NavMenuItem"><a href="CompanyProfile.php">Company Profile</a></li> <li class="NavMenuItem"><a href="Store.php">Store</a> <div class="NavMenuItemArrow"><a href="#" id="NavMenuItemArrow" onclick="doOnClick('NavMenuItemArrow', 'NavSubmenu')">▼</a> <ul class="NavSubmenu" id="NavSubmenu"> <li class="NavMenuItem"><a href="Category1.php">Comparators</a></li> <li class="NavMenuItem"><a href="Category2.php">LDR</a></li> <li class="NavMenuItem"><a href="Category3.php">LED</a></li> <li class="NavMenuItem"><a href="Category4.php">Operational Amplifiers</a></li> <li class="NavMenuItem"><a href="Category5.php">Phototransistor</a></li> <li class="NavMenuItem"><a href="Category6.php">Potentiometer</a></li> <li class="NavMenuItem"><a href="Category7.php">Rectifier Diodes</a></li> <li class="NavMenuItem"><a href="Category8.php">Resistor</a></li> <li class="NavMenuItem"><a href="Category9.php">Schottky Diodes</a></li> <li class="NavMenuItem"><a href="Category10.php">Transitors NPN</a></li> <li class="NavMenuItem"><a href="Category11.php">Transistors PNP</a></li> <li class="NavMenuItem"><a href="Category12.php">Zener Diodes</a></li> </ul> </div> </li> </ul> <div class="NavImage"> <img width="100%" alt="Navigation image 1" src="images/NavigationImage1.jpg" /> </div> <div class="NavImage"> <img width="100%" alt="Navigation image 2" src="images/NavigationImage2.jpg" /> </div> </nav><script type="text/javascript"> function doOnClick(strArrowLinkID, strSubmenuID) { var ArrowLinkField = document.getElementById(strArrowLinkID); var Submenu = document.getElementById(strSubmenuID); var strText = ArrowLinkField.innerHTML; var strDown = String.fromCharCode(0x25BC); var strUp = String.fromCharCode(0x25B2); if (strText == strDown) { ArrowLinkField.innerHTML = strUp; Submenu.style = "display:block;"; } else { ArrowLinkField.innerHTML = strDown; Submenu.style = "display:none;"; } } </script> CSS /*************************/ /* Navigation submenu */ /*************************/ .NavSubmenu{ behavior:url(CSSPie/PIE.htc); display:none; list-style-type:none; position:relative; z-index:999; background-color:#<?php echo $_SESSION["ContainerColor"]; ?>; width:<?php echo $nNavigationWidth - 2; ?>px; left:-<?php echo $nNavigationWidth - 16; ?>px; top:-10px; padding:0px 0px 0px 0px; overflow:hidden; border-style:solid; border-width:thin; border-color:transparent; } li > div > a + ul > li > a{ behavior:url(CSSPie/PIE.htc); display:block; position:relative; background-color:#<?php echo $_SESSION["LinkColor"]; ?>; color:#<?php echo $_SESSION["LinkFontColor"]; ?>; font-family:<?php echo $_SESSION["LinkFont"]; ?>; font-size:medium; text-align:left; margin-left:20px; padding-left:2px; width:<?php echo $nButtonWidth - 20; ?>px; height:<?php echo $nButtonHeight; ?>px; line-height:<?php echo $nButtonHeight; ?>px; vertical-align:middle; top:0px; left:0px; border-radius:3px; border-style:solid; border-width:thin; border-color:#<?php echo $_SESSION["ContainerColor"]; ?>; } li > div > a + ul > li > a:hover, li > div > a + ul > li > a:active{ behavior:url(CSSPie/PIE.htc); display:block; position:relative; background-color:#<?php echo $_SESSION["HoverLinkColor"]; ?>; color:#<?php echo $_SESSION["HoverLinkFontColor"]; ?>; font-family:<?php echo $_SESSION["HoverLinkFont"]; ?>; font-size:medium; text-align:left; margin-left:20px; padding-left:2px; width:<?php echo $nButtonWidth - 20; ?>px; height:<?php echo $nButtonHeight; ?>px; line-height:<?php echo $nButtonHeight; ?>px; vertical-align:middle; top:0px; left:0px; border-radius:3px; border-style:solid; border-width:thin; border-color:#<?php echo $_SESSION["HoverLinkFont"]; ?>; } /*************************/ /* Navigation image */ /*************************/ .NavImage{ behavior: url(CSSPie/PIE.htc); display:block; position:relative; border-style:solid; border-radius:5px; border-top-color:#<?php echo $_SESSION["DarkEdgeContainerColor"]; ?>; border-left-color:#<?php echo $_SESSION["DarkEdgeContainerColor"]; ?>; border-bottom-color:#<?php echo $_SESSION["LightEdgeContainerColor"]; ?>; border-right-color:#<?php echo $_SESSION["LightEdgeContainerColor"]; ?>; width:90%; height:120%; margin-left:auto; margin-right:auto; margin-top:20px; overflow:hidden; }
  11. See attached images. I have a nav menu on the left where one of the items has a little arrow. When you click the arrow a popup menu appears below it. If you click it again the popup menu disappears. The problem is the popup menu is displaying over the top of an image below the nav menu. I would prefer it to push the images down but I can't figure out how to do this. HTML <nav class="navigation"> <ul class="NavMenu"> <li class="NavMenuItem"><a href="index.php">Home</a></li> <li class="NavMenuItem"><a href="CompanyProfile.php">Company Profile</a></li> <li class="NavMenuItem"><a href="Store.php">Store</a> <div class="NavMenuItemArrow"><a href="#" id="NavMenuItemArrow" onclick="doOnClick('NavMenuItemArrow', 'NavSubmenu')">▼</a> <ul class="NavSubmenu" id="NavSubmenu"> <li class="NavMenuItem"><a href="Category1.php">Comparators</a></li> <li class="NavMenuItem"><a href="Category2.php">LDR</a></li> <li class="NavMenuItem"><a href="Category3.php">LED</a></li> <li class="NavMenuItem"><a href="Category4.php">Operational Amplifiers</a></li> <li class="NavMenuItem"><a href="Category5.php">Phototransistor</a></li> <li class="NavMenuItem"><a href="Category6.php">Potentiometer</a></li> <li class="NavMenuItem"><a href="Category7.php">Rectifier Diodes</a></li> <li class="NavMenuItem"><a href="Category8.php">Resistor</a></li> <li class="NavMenuItem"><a href="Category9.php">Schottky Diodes</a></li> <li class="NavMenuItem"><a href="Category10.php">Transitors NPN</a></li> <li class="NavMenuItem"><a href="Category11.php">Transistors PNP</a></li> <li class="NavMenuItem"><a href="Category12.php">Zener Diodes</a></li> </ul> </div> </li> </ul> <div class="NavImage"> <img width="100%" alt="Navigation image 1" src="images/NavigationImage1.jpg" /> </div> <div class="NavImage"> <img width="100%" alt="Navigation image 2" src="images/NavigationImage2.jpg" /> </div> </nav><script type="text/javascript"> function doOnClick(strArrowLinkID, strSubmenuID) { var ArrowLinkField = document.getElementById(strArrowLinkID); var Submenu = document.getElementById(strSubmenuID); var strText = ArrowLinkField.innerHTML; var strDown = String.fromCharCode(0x25BC); var strUp = String.fromCharCode(0x25B2); if (strText == strDown) { ArrowLinkField.innerHTML = strUp; Submenu.style = "display:block;"; } else { ArrowLinkField.innerHTML = strDown; Submenu.style = "display:none;"; } } </script> CSS /*************************/ /* Navigation submenu */ /*************************/ .NavSubmenu{ behavior:url(CSSPie/PIE.htc); display:none; list-style-type:none; position:relative; z-index:999; background-color:#<?php echo $_SESSION["ContainerColor"]; ?>; width:<?php echo $nNavigationWidth - 2; ?>px; left:-<?php echo $nNavigationWidth - 16; ?>px; top:-10px; padding:0px 0px 0px 0px; overflow:hidden; border-style:solid; border-width:thin; border-color:transparent; } li > div > a + ul > li > a{ behavior:url(CSSPie/PIE.htc); display:block; position:relative; background-color:#<?php echo $_SESSION["LinkColor"]; ?>; color:#<?php echo $_SESSION["LinkFontColor"]; ?>; font-family:<?php echo $_SESSION["LinkFont"]; ?>; font-size:medium; text-align:left; margin-left:20px; padding-left:2px; width:<?php echo $nButtonWidth - 20; ?>px; height:<?php echo $nButtonHeight; ?>px; line-height:<?php echo $nButtonHeight; ?>px; vertical-align:middle; top:0px; left:0px; border-radius:3px; border-style:solid; border-width:thin; border-color:#<?php echo $_SESSION["ContainerColor"]; ?>; } li > div > a + ul > li > a:hover, li > div > a + ul > li > a:active{ behavior:url(CSSPie/PIE.htc); display:block; position:relative; background-color:#<?php echo $_SESSION["HoverLinkColor"]; ?>; color:#<?php echo $_SESSION["HoverLinkFontColor"]; ?>; font-family:<?php echo $_SESSION["HoverLinkFont"]; ?>; font-size:medium; text-align:left; margin-left:20px; padding-left:2px; width:<?php echo $nButtonWidth - 20; ?>px; height:<?php echo $nButtonHeight; ?>px; line-height:<?php echo $nButtonHeight; ?>px; vertical-align:middle; top:0px; left:0px; border-radius:3px; border-style:solid; border-width:thin; border-color:#<?php echo $_SESSION["HoverLinkFont"]; ?>; } /*************************/ /* Navigation image */ /*************************/ .NavImage{ behavior: url(CSSPie/PIE.htc); display:block; position:relative; border-style:solid; border-radius:5px; border-top-color:#<?php echo $_SESSION["DarkEdgeContainerColor"]; ?>; border-left-color:#<?php echo $_SESSION["DarkEdgeContainerColor"]; ?>; border-bottom-color:#<?php echo $_SESSION["LightEdgeContainerColor"]; ?>; border-right-color:#<?php echo $_SESSION["LightEdgeContainerColor"]; ?>; width:90%; height:120%; margin-left:auto; margin-right:auto; margin-top:20px; overflow:hidden; }
  12. It is bloody Epression Web causing these problems. Even though I am not using Expression Web to edit my .css file it still keeps trying to re-format the code. Often when I try to save the .css in notepad.exe I get a message saying the file has changed and do I want to re-load it. Occasionally I have hit the wrong response and then I find all my css/php code $%&@# up. Then it takes me ages to get it all working again. The single quote was probably a result of this. I ended up having to remove all the CSS code and then put it back one bit at a time until I found all the damn errors that expression web had introduced. Windows notepad.exe has it own problems. e.g. poor undo/redo I have since discovered notepad plus and notepad2.
  13. I am in the process of getting rid of all my ids and switching to classes. But I am now having trouble getting my popup menu working again. When the mouse hovers over the <a></a> element in blue, I want to select the <div></div> element in green. But this CSS code does not work li > a:hover div{....} li > a:hover + div{....} So what is the correct way to select this element? I also wish to select this element <div class="NavSubMenuBalloon"> <div class="navigation"> <ul class="NavMenu"> <li class="NavMenuItem"><a href="index.php">Home</a></li> <li class="NavMenuItem"><a href="CompanyProfile.php">Company Profile</a></li> <li class="NavMenuItem"><a href="Store.php">Store</a><div class="NavSubMenuArrow">▸</div> <div class="NavSubMenuBalloon"> <div class="NavBalloonArrow"></div> <ul class="NavSubMenu"> <li class="NavMenuItem"><a href="Category1.php">Comparators</a></li> <li class="NavMenuItem"><a href="Category2.php">LDR</a></li> <li class="NavMenuItem"><a href="Category3.php">LED</a></li> <li class="NavMenuItem"><a href="Category4.php">Operational Amplifiers</a></li> <li class="NavMenuItem"><a href="Category5.php">Phototransistor</a></li> <li class="NavMenuItem"><a href="Category6.php">Potentiometer</a></li> <li class="NavMenuItem"><a href="Category7.php">Rectifier Diodes</a></li> <li class="NavMenuItem"><a href="Category8.php">Resistor</a></li> <li class="NavMenuItem"><a href="Category9.php">Schottky Diodes</a></li> <li class="NavMenuItem"><a href="Category10.php">Transitors NPN</a></li> <li class="NavMenuItem"><a href="Category11.php">Transistors PNP</a></li> <li class="NavMenuItem"><a href="Category12.php">Zener Diodes</a></li> </ul> </div> </li> </ul> <div class="NavImage"> <img width="100%" alt="Navigation image 1" src="images/NavigationImage1.jpg" /> </div> <div class="NavImage"> <img width="100%" alt="Navigation image 2" src="images/NavigationImage2.jpg" /> </div></div>
  14. I have made some change to cause two of my <div> to not display no matter what I do with the CSS. And I don't understand what change has caused it. #content and #navigation wont display no matter what I do. Screen shot of the resulting web page is attached. The container, header structure and footer structure are there but no navigation div nor content div. It may be that Expression web has stuffed something up in CSS but I can't see the problem. Expression web is a pain in the arse with CSS if you put in php code in with it - it just keeps re-arranging the code and causing PHP syntax errors and CSS screw ups. I fixed all the PHP syntax errors but....... HTML <?php header('Content-Type: text/html; charset=utf8'); session_start(); include "Inventory.php"; include "Browser.php";?><!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>Home</title> <?php include "Style.css"; ?> <script type="text/javascript"> <?php if (isOldBrowser()) { include "html5shiv.js"; } ?> </script> </head> <body> <div id="container"> <?php include "Header.htm"; ?> <div id="columns"> <?php include "NavigationStructure.htm"; ?> <div id="content"> <?php function getHitCount() { $nCount = 0; if ($file = fopen("Hits.txt", "r")) { $nCount = intval(fgets($file)); fclose($file); if (!$_SESSION["HitLogged"] && ($file = fopen("Hits.txt", "w"))) { fputs($file, strval($nCount + 1)); fclose($file); $_SESSION["HitLogged"] = true; } } return strval($nCount); } ?> <p id="PageTitle"> <script type="text/javascript"> document.write(document.title); </script> <span style="float:right;">Hits:<?php echo getHitCount(); ?></span> </p> <!--******************************************************************************************************************************************** ******************************************************************************************************************************************** Start main content ******************************************************************************************************************************************** ********************************************************************************************************************************************--> <p>sffsdgfdgdfgdfg</p> <p>sffsdgfdgdfgdfg</p> <p>sffsdgfdgdfgdfg</p> <p>sffsdgfdgdfgdfg</p> <p>sffsdgfdgdfgdfg</p> <p>sffsdgfdgdfgdfg</p> <p>sffsdgfdgdfgdfg</p> <p>sffsdgfdgdfgdfg</p><!--******************************************************************************************************************************************** ******************************************************************************************************************************************** End main content ******************************************************************************************************************************************** ********************************************************************************************************************************************--> </div> </div> <?php include "Footer.htm"; ?> </div> </body></html> CSS /**********************************************************************************************************************/ /**********************************************************************************************************************/ /** Page structure **/ /**********************************************************************************************************************/ /**********************************************************************************************************************/ h1 { display:block; font-family:<?php echo $_SESSION["ContentsFont"]; ?>; font-size:3em; font-weight:bold; color:<?php echo $_SESSION["ContentsFontColor"]; ?>; margin:12px; text-decoration:underline; } h2 { display:block; position:relative; font-family:<?php echo $_SESSION["ContentsFont"]; ?>; font-size:xx-large; font-weight:bold; color:<?php echo $_SESSION["ContentsFontColor"]; ?>; margin:12px; text-decoration:underline; } h3 { display:block; font-family:<?php echo $_SESSION["ContentsFont"]; ?>; font-size:x-large; font-weight:bold; color:<?php echo $_SESSION["ContentsFontColor"]; ?>; margin:12px; text-decoration:underline; } h4 { display:block; font-family:<?php echo $_SESSION["ContentsFont"]; ?>; font-size:large; font-weight:bold; color:<?php echo $_SESSION["ContentsFontColor"]; ?>; margin:12px; text-decoration:underline; } h5 { display:block; font-family:<?php echo $_SESSION["ContentsFont"]; ?>; font-size:medium; font-weight:bold; color:<?php echo $_SESSION["ContentsFontColor"]; ?>; margin:12px; text-decoration:underline; } hr{ color:#<?php echo $_SESSION["ContainerColor"]; ?>; border-style:outset; border-width:medium; width:98%; } p { font-family:<?php echo $_SESSION["ContentsFont"]; ?>; font-size:medium; font-weight:normal; color:<?php echo $_SESSION["ContentsFontColor"]; ?>; margin:12px } ul { display:block; margin:12px } li { font-family:<?php echo $_SESSION["ContentsFont"]; ?>; font-size:medium; font-weight:normal; color:<?php echo $_SESSION["ContentsFontColor"]; ?>; margin:12px } #container { behavior: url(CSSPie/PIE.htc); display:block; position:relative; width:<?php echo $nContainerWidth; ?>px; background-color:#<?php echo $_SESSION["ContainerColor"]; ?>; font-family:<?php echo $_SESSION[ContainerFont]; ?>; font-size:small; color:<?php echo $_SESSION["ContentsFontColor"]; ?>; text-align:left; border-radius:5px; border-top-color:#<?php echo $_SESSION["LightEdgeContainerColor"]; ?>; border-left-color:#<?php echo $_SESSION["LightEdgeContainerColor"]; ?>; border-bottom-color:#<?php echo $_SESSION["DarkEdgeContainerColor"]; ?>; border-right-color:#<?php echo $_SESSION["DarkEdgeContainerColor"]; ?>; border-left-style: solid; border-right-style: solid; border-top-style: solid; border-bottom-style: solid; } #columns{ display:none; width:100%; min-height:<?php echo $strContainerMinHeight; ?>; margin-top:0px; clear:both' border-style:solid; border-width:thin; border-color:yellow yellow yellow yellow; } #navigation{ display:block; /* position:relative; float:left; width:<?php echo $nNavigationWidth; ?>px; clear:right; margin-top:8px;*/ border-style:solid; border-width:thin; border-color:red red red red; } #content{ behavior: url(CSSPie/PIE.htc); display:block;/* position:relative; background-color:<?php echo $_SESSION["ContentsColor"]; ?>; float:left; width:80%; font-family:<?php echo $_SESSION["ContentsFont"]; ?>; font-size:small; color:black; text-align:left; border-radius:5px; border-top-color:#<?php echo $_SESSION["DarkEdgeContainerColor"]; ?>; border-left-color:#<?php echo $_SESSION["DarkEdgeContainerColor"]; ?>; border-bottom-color:#<?php echo $_SESSION["LightEdgeContainerColor"]; ?>; border-right-color:#<?php echo $_SESSION["LightEdgeContainerColor"]; ?>; min-height:<?php echo $strContainerMinHeight; ?>; border-left-style: solid; border-right-style: solid; border-top-style: solid; border-bottom-style: solid;*/ } #footer { display:block; position:relative; clear:both; font-family:<?php echo $_SESSION[ "ContainerFont"]; ?>; font-size:medium; color:#<?php echo $_SESSION["ContainerFontColor"]; ?>; text-align:left; padding-left:260px; line-height:50px; vertical-align:middle; height:50px; margin-bottom:12px; border-style:solid; border-width:thin; border-color:red red red red; } #header { display:block; position:relative; top:-10px; width:100%; height:<?php echo $nHeaderHeight; ?>px; border-style:none; border-width:thin; } #heading { behavior: url(CSSPie/PIE.htc); display:block; position:relative; float:left; font-family:<?php echo $_SESSION["MainHeadingFont"]; ?>; font-size:4.5em; font-weight:bold; color:#<?php echo $_SESSION["MainHeadingColor"]; ?>; text-shadow:3px 3px 0px #<?php echo $_SESSION["MainHeadingShadowColor"]; ?>; width:<?php echo $nHeadingWidth; ?>px; height:100%; vertical-align:middle; line-height:100%; border-style:none; border-width:thin; } #motto{ behavior: url(CSSPie/PIE.htc); display:block; position:relative; font-family:<?php echo $_SESSION["MainHeadingFont"]; ?>; font-size:xx-large; font-weight:bold; color:#<?php echo $_SESSION["MainHeadingColor"]; ?>; text-shadow:2px 2px 0px #<?php echo $_SESSION["MainHeadingShadowColor"]; ?>; height:36px; line-height:36px; margin-top:10px; margin-bottom:10px; border-style:none; border-width:thin; } #ABN{ behavior: url(CSSPie/PIE.htc); display:block; position:relative; font-family:<?php echo $_SESSION["ContainerFont"]; ?>; font-size:medium; font-weight:bold; color:#<?php echo $_SESSION["ContainerFontColor"]; ?>; height:25px; line-height:25px; text-align:right; border-style:none; border-width:thin; } #HeaderImage{ behavior: url(CSSPie/PIE.htc); display:block; float:left; border-radius:5px; border-style:solid; border-top-color:#<?php echo $_SESSION["DarkEdgeContainerColor"]; ?>; border-left-color:#<?php echo $_SESSION["DarkEdgeContainerColor"]; ?>; border-bottom-color:#<?php echo $_SESSION["LightEdgeContainerColor"]; ?>; border-right-color:#<?php echo $_SESSION["LightEdgeContainerColor"]; ?>; width:<?php echo $nContainerWidth - $nNavigationWidth - $nHeadingWidth + 26; ?>px; height:<?php echo $nHeaderImageHeight; ?>px; margin-top:auto; margin-bottom:auto; overflow:hidden; margin-left:10px; } #symbol{ behavior: url(CSSPie/PIE.htc); display:block; float:left; margin-left:10px; margin-right:10px; height:100%; line-height:100%; vertical-align:middle; overflow:hidden; border-style:none; border-width:thin; border-color:black; } #PageTitle { behavior: url(CSSPie/PIE.htc); display: block; color:#<?php echo $_SESSION["PageHeadingFontColor"]; ?>; font-family:<?php echo $_SESSION["PageHeadingFont"]; ?>; font-size:42px; font-weight:bold; text-shadow:2px 2px 0px #<?php echo $_SESSION["MainHeadingShadowColor"]; ?>; }
  15. gregaryb

    Paypal API

    https://developer.paypal.com/docs/classic/api/button-manager/BMUpdateButton_API_Operation_NVP/ Sorry if this is the wrong place to be asking this, but the above 'help' site does not give me any clue on where to start. They have listed all the variables you can use with paypal API, but I cannot see any mention of how you use the damn things in a practical sense. Are the variables meant to be the names of hidden inputs? I have played with this sort of thing before. Are they meant to be used with an existing function or features already in php or javascript or html,......? Are you meant to download something, install it in your website which then provides a function that you pass these variables to in some form? No clue!
  16. I just figured out what is causing this. It has nothing to do with the code. It is bloody Microsoft Expression Web chucking a hissy fit and inserting double quotes in inappropriate places and removing ?>. But it does not display these changes so you have no way of knowing about them. I closed Expression Web and opened the file and found the code screw ups. If I edit the code with notepad - no problem!
  17. If I leave that block of CSS commented out then the rest of the CSS (with PHP echo filling in various values) works. But as soon as I uncomment that first bit of CSS I get a PHP syntax error message on this bit of code: font-family:<?php echo $_SESSION["LinkFont"]; ?> What has that CSS code got to do with PHP on the server? All the preceding bits of CSS where I have used echo to fill in values passes OK. So what the ###### is going on here? /* #NavMenu{ list-style-type:none; margin:0; padding:0; } #NavMenuItem{ list-style-type:none; }*/ #NavMenuItem a{ behavior: url(CSSPie/PIE.htc); display: block; position:relative; background-color:#<?php echo $_SESSION["LinkColor"]; ?>; border-top-color:#<?php echo $_SESSION["LinkBorderColor"]; ?>; border-left-color:#<?php echo $_SESSION["LinkBorderColor"]; ?>; border-bottom-color:#<?php echo $_SESSION["LinkBorderColor"]; ?>; border-right-color:#<?php echo $_SESSION["LinkBorderColor"]; ?>; color:#<?php echo $_SESSION["LinkFontColor"]; ?>; font-family:<?php echo $_SESSION["LinkFont"]; ?>; font-size:small; left:0px; width: <?php echo $nButtonWidth; ?>px; height:30px; line-height:30px; vertical-align:middle; padding-left:10px; margin-top:-10px; border-style:solid; border-width:thin; border-color:#<?php echo $_SESSION["LinkColor"]; ?>; border-radius:3px; }
  18. If this line font-family:<?php echo "Arial"; ?>; of CSS/PHP remains not commented out then I get this PHP error message "Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/gregsind/public_html/EasyWebStore/Style.css on line 33" All the other css properties that I have used a php echo to fill in the value are fine. But this single font-family property just wont work. I just don't get it. #NavMenuItem a{ behavior: url(CSSPie/PIE.htc); display: block; position:relative;/* background-color:#<?php echo $_SESSION["LinkColor"]; ?>; border-top-color:#<?php echo $_SESSION["LinkBorderColor"]; ?>; border-left-color:#<?php echo $_SESSION["LinkBorderColor"]; ?>; border-bottom-color:#<?php echo $_SESSION["LinkBorderColor"]; ?>; border-right-color:#<?php echo $_SESSION["LinkBorderColor"]; ?>; color:#<?php echo $_SESSION["LinkFontColor"]; ?>;*/ font-family:<?php echo "Arial"; ?>;/* font-size:small; left:0px; width: <?php echo $nButtonWidth; ?>px; height:30px; line-height:30px; vertical-align:middle; padding-left:10px; margin-top:-10px; border-style:solid; border-width:thin; border-color:#<?php echo $_SESSION["LinkColor"]; ?>; border-radius:3px;*/ }
  19. After fiddling around with CSS properties I have managed to get this menu/popup menu to display correctly in both Firefox 30 and IE 8 on a WinXP machine. Specifically such that the little right arrow character and popup menu are properly aligned with the "Store" menu item and with the two images below the menu centred. See attached image files/ However the side effect is that the popup menu now pushes those two images down when it appears and I can't figure out how to prevent this. Suggestions? Relevant bit of style.css /**********************************************************************************************************************/ /**********************************************************************************************************************/ /** Navigation menu structure **/ /**********************************************************************************************************************/ /**********************************************************************************************************************/ #NavMenu{ /*nav ul*/ list-style-type: none; margin: 0; padding: 0; } #NavMenuItem{ list-style-type: none; } #NavMenuItem a{ behavior: url(CSSPie/PIE.htc); display: block; position:relative; background-color:<?php echo $strButtonColor; ?>; border-top-color:<?php echo $strLightButtonColor; ?>; border-left-color:<?php echo $strLightButtonColor; ?>; border-bottom-color:<?php echo $strDarkButtonColor; ?>; border-right-color:<?php echo $strDarkButtonColor; ?>; color:<?php echo $strButtonFontColor; ?>; left:0px; width: <?php echo $nButtonWidth; ?>px; height:25px; line-height:25px; vertical-align:middle; padding-left:10px; margin-top:-10px; border-style:solid; border-width:<?php echo $strButtonBorderWidth; ?>; border-width:thin; border-color:<?php echo $strButtonColor; ?>; } #NavMenuItem a:hover { behavior: url(CSSPie/PIE.htc); display: block; position:relative; background-color:<?php echo $strHoverButtonColor; ?>; color:<?php echo $strButtonFontColor; ?>; left:0px; width: <?php echo $nButtonWidth; ?>px; height:25px; line-height:30px; vertical-align:middle; padding-left:10px; margin-top:-10px; border-style:solid; border-width:<?php echo $strButtonBorderWidth; ?>; border-top-color:<?php echo $strLightHoverButtonColor; ?>; border-left-color:<?php echo $strLightHoverButtonColor; ?>; border-bottom-color:<?php echo $strDarkHoverButtonColor; ?>; border-right-color:<?php echo $strDarkHoverButtonColor; ?>; border-radius:3px; } #NavMenuItem a:active { behavior: url(CSSPie/PIE.htc); display: block; position:relative; background-color:<?php echo $strHoverButtonColor; ?>; color:<?php echo $strButtonFontColor; ?>; left:0px; width: <?php echo $nButtonWidth; ?>px; height:25px; line-height:30px; vertical-align:middle; padding-left:10px; margin-top:-10px; border-style:solid; border-width:<?php echo $strButtonBorderWidth; ?>; border-top-color:<?php echo $strDarkHoverButtonColor; ?>; border-left-color:<?php echo $strDarkHoverButtonColor; ?>; border-bottom-color:<?php echo $strLightHoverButtonColor; ?>; border-right-color:<?php echo $strLightHoverButtonColor; ?>; border-radius:3px; } #NavSubMenu{ /*nav ul li div*/ list-style-type:none; display:block; position:relative; } #NavSubMenuArrow{ /*nav ul li div*/ display:block; position:relative; clear:both; float:right; width:12px; left:0px; top:-20px; height:14px; line-height:14px; vertical-align:middle; text-align:center; color:<?php echo $strButtonFontColor; ?>; background-color:<?php echo $strButtonColor; ?>; } #NavMenuItem a:hover + #NavSubMenuArrow{ display:block; position:relative; clear:both; width:12px; left:0px; top:-20px; height:14px; line-height:14px; vertical-align:middle; text-align:center; color:white; background-color:<?php echo $strHoverButtonColor; ?>; } #NavSubMenu{ border-style:none; border-width:thin; border-color:black; padding:0px 0px 0px 0px; width:<?php echo $nPopupWidth - 28; ?>px; } #NavSubMenuBalloon { /*nav ul li div*/ display:none; } #NavMenuItem:hover > #NavSubMenuBalloon { /*nav ul li:hover > div*/ behavior: url(CSSPie/PIE.htc); list-style-type:none; position:relative; float:right; clear:both; display:inline; background:<?php echo $strButtonColor; ?>; border-style:solid; border-width:medium; border-top-color:<?php echo $strLightContainerColor; ?>; border-left-color:<?php echo $strLightContainerColor; ?>; border-bottom-color:<?php echo $strDarkContainerColor; ?>; border-right-color:<?php echo $strDarkContainerColor; ?>; border-radius:5px; top:-50px; left:328px; padding-left:5px; width:<?php echo $nPopupWidth; ?>px; z-index:999; } #NavBalloonArrow{ display: block; position: absolute; border-color: transparent <?php echo $strButtonColor; ?> transparent transparent; /*border-color: transparent black transparent transparent;*/ border-style: solid; border-width: 20px; height: 0px; left: -57px; top: 0px; width: 0px; float:left; } #NavImage1{ behavior: url(CSSPie/PIE.htc); display:block; position:relative; clear:both; margin-left:auto; margin-right:auto; border-style:solid; border-radius:5px; border-top-color:<?php echo $strDarkContainerColor; ?>; border-left-color:<?php echo $strDarkContainerColor; ?>; border-bottom-color:<?php echo $strLightContainerColor; ?>; border-right-color:<?php echo $strLightContainerColor; ?>; width:88%; height:317px; overflow:hidden; margin-bottom:12px; } #NavImage2{ behavior: url(CSSPie/PIE.htc); display:block; position:relative; clear:both; margin-left:auto; margin-right:auto; border-style:solid; border-radius:5px; border-top-color:<?php echo $strDarkContainerColor; ?>; border-left-color:<?php echo $strDarkContainerColor; ?>; border-bottom-color:<?php echo $strLightContainerColor; ?>; border-right-color:<?php echo $strLightContainerColor; ?>; width:88%; height:317px; overflow:hidden; margin-bottom:12px; } NavigationStructure.htm <div id="navigation"> <ul id="NavMenu"> <li id="NavMenuItem"><a href="index.php">Home</a></li> <li id="NavMenuItem"><a href="CompanyProfile.php">Company Profile</a></li> <li id="NavMenuItem"><a href="Store.php">Store</a><div id="NavSubMenuArrow">▸</div> <span id="NavSubMenuBalloon"> <ul id="NavSubMenu"> <div id="NavBalloonArrow"></div> <li id="NavMenuItem"><a href="Category1.php">Comparators</a></li> <li id="NavMenuItem"><a href="Category2.php">LDR</a></li> <li id="NavMenuItem"><a href="Category3.php">LED</a></li> <li id="NavMenuItem"><a href="Category4.php">Operational Amplifiers</a></li> <li id="NavMenuItem"><a href="Category5.php">Phototransistor</a></li> <li id="NavMenuItem"><a href="Category6.php">Potentiometer</a></li> <li id="NavMenuItem"><a href="Category7.php">Rectifier Diodes</a></li> <li id="NavMenuItem"><a href="Category8.php">Resistor</a></li> <li id="NavMenuItem"><a href="Category9.php">Schottky Diodes</a></li> <li id="NavMenuItem"><a href="Category10.php">Transitors NPN</a></li> <li id="NavMenuItem"><a href="Category11.php">Transistors PNP</a></li> <li id="NavMenuItem"><a href="Category12.php">Zener Diodes</a></li> </ul> </span> </ul> <div id="NavImage1"> <img width="100%" alt="Navigation image 1" src="images/NavigationImage1.jpg" /> </div> <div id="NavImage2"> <img width="100%" alt="Navigation image 2" src="images/NavigationImage2.jpg" /> </div></div>
  20. What you see is what you get. I have not applied styles to the table other than through the classes. I suspect I would be better off doing this with divs rather than tables. There seems like there is too much 'baggage' that comes with tables that seems to stuff things up unexpectedly.
  21. <table class="CartDetailsTable"> <tr><th width="33%"><b>Photo</b></th><th width="33%"><b>Description</b></th><th width="10%"><b>Price</b></th><th width="15%"><b>Quantity</b></th><th><b>Sub-totals</b></th></tr> </table> .ClientDetailsTable{ background-color:#C0C0C0; width:99%; border:thin black solid; border-radius:5px; }; .CartDetailsTable{ background-color:#C0C0C0; width:99%; border:thin black solid; margin-left:10px; border-radius:5px; }; class ClientDetailsTable works quite happily on another table but class CartDetailsTable wont work on the above table. I can however apply class ClientDetailsTable to the above table and it works happily. If I swap the position of the two classes so that CartDetailsTable is the first one then it works while class ClientDetailsTable stops working. What the bloody ###### is going on here???????? Is there some bizarre rule with CSS class naming that I don't know about?
×
×
  • Create New...