Please bear with me as I am new to Sitefinity and am still a long way from mastering css. I have a page template for which I have added a custom theme. I have given my layout elements wrapper classes and added them to my custom theme css class. However, these do not appear to be working. In Firebug, the wrapper class elements are shown with a strike-through line, like they are being ignored and, of course, the screen appears that they ARE being ignored. Constructing a template in Sitefinity follows designer best practices and is really straightforward once you see. For developers: Add CSS resources. You can add CSS resources to your widget, page, or master template only through markup. You have two options to add the CSS. Is there something I am diong wrong? This shows one of my wrapper classes being applied in the html. Hey Donna, The reason why.sf_cols overrides.gmc_header is because its defined later in the css. Either you load the styles for.sf_cols in a different css files that gets added after the one that defines the.gmc_header class or its defined further down in the same.css. --- So you can leave it as is, with using!important but then you'll never be able to override it again in case you run into some browser quirk you need to 'hack'. --- You can change the loading order to ensure that sf_cols gets defined before the actual project styles. Either by changing the cssloadorder.xml in your global folder or re-arrange the stylesheet. --- Or you can go the id route instead of using a class and make it. Hope it helps. Hi Jochem, I really appreciate your help. I have tried a couple of your suggestions. I put an empty.sf_cols entry in the same css file as my.gmc_header. I put it before and then I put it after and neither worked. I then edited the cssLoadOrder.xml - I put Site.css as the last entry and then as the first entry - again, neither worked. I may have done all of this wrong as I am a bit confused first because I thought whatever is loaded last (css-wise) is applied. I would think that the custom theme css would be loaded last. I can't control when the default Sitefinity classes are loaded. Or is that what changing the cssLoadOrder file does? If so, that did not work - possibly I did something wrong. I would love to go the id route, but how do I do this? This is a page layout element with an image and a navigation widget. I can only see how to add a wrapper class to this. Thank you again, so much, for your help, Donna.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2018
Categories |