<p>I've created a custom list, and made some changes to the way the CQWP renders it on a page by modifying ItemStyle.xsl. However, I'd like to use some custom css classes and therefore I'd like to link to my own custom .css file from the head tag of the pages containing this CQWP.</p>

<p>So my question is, where to do put my .css file and how do I link it properly to a page containing the CQWPs. Please have in mind that I'm making a solution that should be deployed on multi sharepoint installations.</p>

<p>Thanks.</p>

[{'answer_id': 53624, 'author': 'Hafthor', 'author_id': 4489, 'author_profile': 'https://Stackoverflow.com/users/4489', 'pm_score': 0, 'selected': False, 'text': '<p>Consider uploading them to "Style Library" in the root of the site collection.\n<p>If you don\'t have a "Style Library" at the root, consider making one -- it\'s just a document library.\n<p>Make sure the permissions are set correctly so everyone who needs to read it can.\n<p>You can reference them using "/Style%20Library/my.css" but this won\'t work on site collections that don\'t live at the root of the domain.</p>\n'}, {'answer_id': 53711, 'author': 'Mauro', 'author_id': 2208, 'author_profile': 'https://Stackoverflow.com/users/2208', 'pm_score': 3, 'selected': True, 'text': '<p>The microsoft official way is just to copy them into the relevant folders (as seen by downloading their template packs).  However, you could also create your own site definition and add the items to the correct libraries and lists in the same way that the master pages are added.</p>\n\n<p>If you are going to deploy CSS and Master Pages through features remember you will have to activate your the publishing infrastructure on the site collection and the publishing feature on the site.</p>\n\n<p>To deploy a master page/page layout as a feature you should follow the steps at the site  below, you can use the "fileurl" element to specify your CSS and place it into the correct folder (style library, for example):\n<a href="http://www.sharepointnutsandbolts.com/2007/04/deploying-master-pages-and-page-layouts.html" rel="nofollow noreferrer">http://www.sharepointnutsandbolts.com/2007/04/deploying-master-pages-and-page-layouts.html</a></p>\n'}]
['https://Stackoverflow.com/questions/53610', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']