In Views admin, is there a section to insert CSS to style the view? i.e. how to style view without editing theme code or other drupal PHP?

Solutions

While I agree that style rules belong in a CSS file (compare with PHP that gets Eval'd) I can see the requirement, especially if it was a multi domain site that ran different themes. You could write a custom module (basically what CSS Injector does as mentioned in a previous answer) but for a complete code free way you could use Panels which is much more aware of CSS, in that you can add some style rules to specific containers within the interface itself.

Actually, the latest views does allow all kinds of CSSing, both from the easiest, such as adding CSS classes to the view Style Settings section, to embedding custom css and fields wrappers in the fields output when you click on their configuration and edit Style Settings there.

But I think the question here is, after you do all that, where do you put the CSS itself.

And that would be in one of your theme's css files, which are defined in your themename.info file (which is located in your theme's toplevel directory) like:

stylesheets[all][] = myfilename.css

So, you could ADD a css file to your theme with your customized CSS without touching anything else in there.

Views does not have anything like that because it belongs in a theme. It's considered good practice for module maintainers to keep themeing small and out of the module itself.

The closest you can get to not editing theme CSS or template pages is using the CSS Injector module.

Tags: Drupal 7 / Views / Theming

Similar questions

Is PHP Drupal 7's templating language? Is ".tpl.php" just a label in a PHP filename on technical grounds, or is it something other than normal PHP?
As I'm learning, Drupal's templating files turn out to PHP files. Now on technical grounds, in terms of how they are executed and interpreted, are they just PHP files that are used as templates, so they can be treated technically as PHP files under XYZ condition, or are they parsed and treated as non-PHP or as some special or modified PHP?
Javascript & Ajax failed to load on many pages like field editing & views editing pages.
The site I'm managing is runs by Drupal 7.53 with many contributed modules. I don't know what happened from yesterday, ajax queries in field editing pages and views editing pages throwing errors or not loading at all. Clearly I can see what is causing this error in JQuery and Ajax. All the modules installed are contributed modules except one custom...
Are there any Drupal modules that allow you to select a template to use for output or are there any modular content editing interfaces?
I'm doing some work for a design agency and I'm looking into how I can achieve their fanciful designs using Drupal. In particular I'm worried about the formate of their blog posts, it's quite clear that what they want is not going to be satisfied by any kind of WYSIWYG editor. So I'm left with two options:
Editing CSS without module/plugin
I am working on a website developed by a previous developer so I am studying how I can edit the style without source code or any extension... is there any possibility to do it?
Is there a module that helps link similar articles together and insert them into each other?
I'm looking for the module that would allow me to manually link related articles together and to then set them to appear within the body of content - as links. What would be your recommendation? I tried to find different modules, but I need specifically something that could work by me simply creating links between different articles on a separate m...
How can I insert PHP code in Views?
I tried the views_php but I have no luck. Any link to its documentation? I want to add some custom field with PHP code inside it but the one I did return nothing. Please see the attached picture.

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.