steveandrews 0 Report post Posted August 19, 2011 I'm having trouble editing the CSS for my site. I'm using Coda to edit style.css on the server but it get's overwritten by dynamic.css. I've read on the forums that I should edit the css in a dialogue in the Custom Code section - this isn't really practical when making lot's of changes and there's no version control. Is there another way I can do this? Share this post Link to post Share on other sites
Rob 547 Report post Posted August 19, 2011 You shouldn't be editing style.css. Add your code to PlatformPro > Custom Code > Custom CSS. From there it's written automagically to dynamic.css and overrules anything in style.css. I'd also suggest you use Firebug for Firefox to identify your CSS needs. Former PageLines Moderator, Food Expert and Raconteur Share this post Link to post Share on other sites
steveandrews 0 Report post Posted August 20, 2011 Hi and thanks for the response. Isn't the point of style.css within the base theme to give users somewhere to add their own styling? It even says in the style.css comments "Edit this style sheet to create your own custom theme based on the Base Platform theme." Adding custom code in the form field of the Pagelines settings field just isn't practical - what if I want to go back a version or want to use a proper CSS editing tool like Coda? In fact, I've just had another look at the Custom code entry field - the notes above it even state that the best way to add css is using the base theme! - see below. "Note: The easiest way to customize your site is using "Base" the child theme for PlatformPro." Sorry if I'm missing something here but there seems to be conflicting information. Thanks again, Steve Share this post Link to post Share on other sites
catrina 103 Report post Posted August 20, 2011 You can edit the style.css stylesheet in PlatformBase or the Custom Code section in settings to add CSS. It doesn't matter which one you choose as long as you're not directly editing any of the core CSS files (which are located in the PlatformPro folder). Please read the docs before posting. Please do not private message me unless I ask you to. Designer | Catrina Dulay Founder | Catrina and Mouse Share this post Link to post Share on other sites
steveandrews 0 Report post Posted August 21, 2011 Hi Catrina and thanks for the response. I understand both methods of editing CSS no problem. My preferred method is to edit style.css, but going back to my original query, style.css get's overwritten by dynamic.css. Share this post Link to post Share on other sites
catrina 103 Report post Posted August 21, 2011 I think that was a fix that was made to make sure the dynamic.css file worked properly. Please read the docs before posting. Please do not private message me unless I ask you to. Designer | Catrina Dulay Founder | Catrina and Mouse Share this post Link to post Share on other sites
steveandrews 0 Report post Posted August 21, 2011 Sorry Catrina, I'm not sure I understand. Are you saying that "the fix" what was to override changes made to style.css with dynamic.css? Share this post Link to post Share on other sites
catrina 103 Report post Posted August 21, 2011 At first there were issues with Custom Code not working properly (code added to it wasn't making changes to the website's styles), and now it is working, but I didn't know it wasn't playing nicely with the style.css file. If you don't use any custom CSS at all and just add your CSS to the style.css file, do the changes take place? Please read the docs before posting. Please do not private message me unless I ask you to. Designer | Catrina Dulay Founder | Catrina and Mouse Share this post Link to post Share on other sites
steveandrews 0 Report post Posted August 21, 2011 If I place the following CSS in the custom code box it works. If I place it in style.css it doesn't. .fixed_width #page, .fixed_width #footer, .canvas #page-canvas {width: 100%;} The is the site I'm working on: http://unicorntraining.600north.co.uk/ My CSS is being overwritten by line 15 of dynamic.css - if you I disable this line in the Chrome inspector (or Firebug if your using Firefox) it works and my changes are made. Share this post Link to post Share on other sites
catrina 103 Report post Posted August 21, 2011 What happens when you add any other CSS code to your style.css file (i.e. any code that styles another site element)? Does it still not work? Please read the docs before posting. Please do not private message me unless I ask you to. Designer | Catrina Dulay Founder | Catrina and Mouse Share this post Link to post Share on other sites
steveandrews 0 Report post Posted August 21, 2011 Just tried resizing H1 elements and that worked - so I guess they're not targeted by dynamic.css. Share this post Link to post Share on other sites
catrina 103 Report post Posted August 21, 2011 Okay. I think from now on the best way is to put those CSS elements mentioned above in the Custom Code box rather than the style.css file. Please read the docs before posting. Please do not private message me unless I ask you to. Designer | Catrina Dulay Founder | Catrina and Mouse Share this post Link to post Share on other sites
steveandrews 0 Report post Posted August 21, 2011 Thanks again for you're response. As I said earlier in this post, I want to be able to edit the CSS via style.css because I can edit it with a proper CSS editor and version control it. While adding the CSS to the Custom Code box may work it's far from practical when you need to make a lot of CSS changes and it's not actually a solution to the problem. The documentation says I should edit style.css to make changes - I've done that and it doesn't work. I'm not looking for a workaround, but rather a solution that will allow me to edit style.css rather than just typing into a form box (custom code box). Being able to edit the CSS via a style sheet was one of the main reasons I purchased this theme but I am unable to do that. Share this post Link to post Share on other sites
Jenny 33 Report post Posted August 21, 2011 In your original question, I think you were asking for maybe another way to edit the style.css. It hasn't been mentioned here yet, but you can also click on Appearance -> Editor and select style.css there. Don't know if it'll help but it's worth a shot. I have tons of custom code in my style.css and I have never had an issue with it being overriden by something else. Maybe try separating those 3 styles rather than grouping them together and see if that works. Just some suggestions I thought of which I hope might help! ♥ Jenny :: Web designer at Simple Mama (follow me at @simplemamacom) Check out Share Me, a social sharing add-on for DMS that is super simple to set up. Share this post Link to post Share on other sites
steveandrews 0 Report post Posted August 22, 2011 I've edited style.css via coda and via Appearance->Editor - the result is the same. I've also tried separating the 3 styles I mentioned above but again it is overritten by dynamic.css Share this post Link to post Share on other sites
Rob 547 Report post Posted August 22, 2011 If there is anything in Custom Code that writes to the same general tag, it will override anything you put into style.css to my experience. Despite all our best wishes, Custom Code, as I said earlier, is your best option. Failing that, you could copy anything you have in dynamic.css over to style.css (overwriting the relative sections yourself) and empty Custom Code entirely. I realize you didn't like my answer, but it was the right one. Sometimes, whether with Platform or Wordpress, we just gotta go with the flow. Former PageLines Moderator, Food Expert and Raconteur Share this post Link to post Share on other sites
steveandrews 0 Report post Posted August 22, 2011 Sorry if I'm not explaining this very well, but I do feel like I'm going round in circles. I've purchased a theme that led me to believe I could edit a stylesheet (style.css) to make changes to the look of the site. This is only partly true because from what I've discovered so far, some styles get overwritten by dynamic.css. Are you saying I should just "go with the flow" and add all my CSS into a form field (Custom code box)? Sorry, but that's not what I paid for. Also, I don't get the statement below. "Failing that, you could copy anything you have in dynamic.css over to style.css (overwriting the relative sections yourself) and empty Custom Code entirely." This isn't a solution, for the same reason above i.e. dynamic.css overwrites some of the CSS from style.css. Share this post Link to post Share on other sites
Rob 547 Report post Posted August 22, 2011 Steve, you are missing something. If Custom Code is empty then dynamic.css will be empty. If all your customized CSS is in style.css as you seem to want, then you're good to go. Without debating the point further one of the key things you bought was the flexibility of PlatformPro and that includes the ability to place custom code in a dynamic manner. Contrary to your rejections, I'm honestly trying to help you. But if you prefer I don't try any further, I've no problem with that. You may of course file a complaint against me, but I'm here on MY time, not Pagelines. Former PageLines Moderator, Food Expert and Raconteur Share this post Link to post Share on other sites
Simon 248 Report post Posted August 22, 2011 OK calm people. @steveandrews There is a bug in 1.5.x where the css load order is wrong. The css should be loaded so the platformbase style.css is last, but actually dynamic.css is last. We have completely changed the css system in the development branch but its too much faff to backport the changes to 1.5.x. Here is a workaround i posted a while back which forces platformbase styl.css to be loaded last meaning you can go ahead and edit it. function late_styles() { echo "n"; } add_action( 'wp_head', 'late_styles', 25 ); add_action( 'wp_print_styles', create_function( '', "wp_dequeue_style('pagelines-stylesheet');") ); [/code] Add it to platformbase/functions.php Share this post Link to post Share on other sites
steveandrews 0 Report post Posted August 22, 2011 @pross Thanks for the tip. Assuming this is something that will be fixed in the next release I'll probably just wait that - I did try putting the above code in platformbase/functions.php but it completely screwed up the site layout. @rangealone I totally respect the time you and the others put into helping me. All I was frustrated with was the fact no one seemed to acknowledge that there was a problem with the way the platform handled style.css. As the problem has been acknowledged and will likely be fixed in a future release, hopefully soon, I am more than happy. Share this post Link to post Share on other sites