I checked the link, and I fully understand the normal print.window bit - I’ve got hat working on the site just fine. The other solution for printing part of a page just doesn’t seem to work. If the head code and the css style is added to a page, the whole page doesn’t display at all - all elements are hidden except the one that has been designated for printing with the .print class. Clearly, I need this to only be the case if the print button is clicked on the page. My reading of the situation is that it needs an onclick event that can be assigned to the print button that activates the hide all elements css before the print-widow bit kicks in. It’s probably a really simple thing to do if you fully understand the css, but getting it to work in blocs is not as simple as I thought it may be.
The reason I need this is that one of my clients is developing a cookery site. One of the options is to print a complete recipe page (I’ve got that bit organised) however they also want an option where just the shopping list of ingredients can be printed. At the moment, I’ve recreated the shopping list in a modal that pops up when a shopping list link is clicked. So far so good.
The next bit is to add a print button on the modal footer that will print just the ingredients list. Sounds simple, but proving to be a real pain in the butt !!!