Custom CSS Stylesheet for the Front Page?

Events happening in the community are now at Drupal community events on www.drupal.org.
Kutakizukari's picture

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!

holyfire's picture

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

Kutakizukari's picture

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...

holyfire's picture

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

Kristina Katalinic's picture

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

Kutakizukari's picture

Sorry I'm having trouble understanding. Can you elaborate a little on how to do this?

Sure

Kristina Katalinic's picture

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

Kutakizukari's picture

Works, thank you all for the responses.

what about loading a different page.css for homepage

giamepalorg's picture

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.

Omega Framework

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: