Need BEGGINER explanation how to use CSS with C5
PermalinkAn example question would be. How do I style individual elements on a page using custom css files in C5?
All comments and explanations are highly valued. Thank you very much.
Is this what you mean?
Basically I'm making styles with firebug and then copying them into a style sheet that I then want to upload and commit to the page... How do I do this?
in config/site.php
define('ENABLE_APPLICATION_EVENTS', true);
Events::extend('on_start', 'Css', 'css', 'libraries/css_add.php');
in libraries/css_add.php
<?php class Css { public function css() { $page = Page::getCurrentPage(); if (!$page->isAdminArea() && !$page->isSystemPage()) { $html = Loader::helper('html'); $v = View::getInstance(); $v->addHeaderItem($html->css('my_style.css')); } } }
If you want to edit a default theme, you will find these files in c5dir/concrete/themes/(themefolder). If you want to edit an installed theme, you will find these files in c5dir/themes/(themefolder).
Also, some themes are customizables, so you can edit a few styles from dashboard (The Themes section, Customize button on the theme).
These styles will not apply to blocks. You will find the core blocks in c5dir/concrete/blocks/(themefolder) and the installed blocks in c5dir/themes/(themefolder).
Hope you've understood me,
Marti
What are the differences in those? Where do I create them, and what are there purpose? Is there anyway to just upload a custom style sheet I've created for a specific page and apply it to that page?
Both main and typography css files are used to stile, but typography.css is used by the C5 Content Editor.
More info:http://www.smartwebprojects.net/concrete5-blog/131/typography-css-i...
I recommend you also to read the documentation:
http://www.concrete5.org/documentation/developers/pages/overview/...
Martí
You basically want to be able to edit the website, if so, it's just a matter of creating a theme and uploading it to the themes directory. (I can give you more details on this).
Here's a video:http://www.concrete5.org/documentation/how-tos/designers/make-a-the...
If you want to edit how C5 looks, then that means editing the 'core'. Since I don't know how to do this, someone more qualified should be able to help.