Posted by Kutakizukari on December 28, 2012 at 6:08pm
After I take a snapshot with Delta and create a custom Front Page with Context, how do I add a custom CSS Stylesheet that only affects the Front Page and not the entire site?
After I take a snapshot with Delta and create a custom Front Page with Context, how do I add a custom CSS Stylesheet that only affects the Front Page and not the entire site?
Comments
Toggle Styles!
With administration > appearance > delta > toggle styles you can apply (or choose not to apply) specific styles).
You will also need to add those css options to your %themename%.info file (typically located at \sites\all\themes\themename\themename.info
You'll want to add a name and a description, should look something like this:
css[global_services_overview.css][name] = 'Your custom global styles for service overview page'
css[global_services_overview.css][description] = 'This file holds all the globally active custom CSS of your service overview page delta.'
Should work like a charm... shoot me a message aaron at digitalbrinq.com if you need more help.
"Eat food. Not too much. Mostly plants."
— Michael Pollan (In Defense of Food: An Eater's Manifesto)
Was thinking about doing this
Was thinking about doing this but was not sure if I would mess somthing up by copying one of those over to my own stylesheet and if it would show up on the delta page to enable and disable.
Will give it a try.
One more thing...
You'll also need to probably clear your cache to see the files in the admin interface. Hope this helps... cheers...
"Eat food. Not too much. Mostly plants."
— Michael Pollan (In Defense of Food: An Eater's Manifesto)
If only the css is specific
If only the css is specific to the front page then just use .front in your style sheet for styling the front page.. You don't need any modules that way
Drupal web developer and Search Engine Optimisation consultant at Webmar Design & Development Brisbane, Australia
Google+
Sorry I'm having trouble
Sorry I'm having trouble understanding. Can you elaborate a little on how to do this?
Sure
Lets say you want to create a front page specific css style for a block ....lets make this block have a blue background even thou on your other pages the block will have a white background
You would add .front before the block class like this:
/for front page blocks/
.front .block { background: #0000FF;}
/all other page blocks/
.block {background:#FFFFFF;}
Drupal web developer and Search Engine Optimisation consultant at Webmar Design & Development Brisbane, Australia
Google+
Works, thank you all for the
Works, thank you all for the responses.
what about loading a different page.css for homepage
actually I customized the home page of my website with some christmas-animation. the effect is good but it starts for every click inside the website and it would annoy eventually. I wonder if it was possible to create a new page.css file (with the animation) only for the webpage and leaving the original page.css for all the rest.