Questions tagged [css]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
45 views

CSS folder with XAMPP and Craft Cms

I am using XAMPP with Craft CMS 3. I am doing the tutorial with craftquest. I have moved the stylesheets folder into my web folder but craft cant seem to find my folder? How do i make craft find the ...
1
vote
1answer
155 views

Error: File to import not found or unreadable: ../../../../../lib/craftcms-sass/mixins

I have two Craft websites running locally and they both have broken css on the backend due to the error below. Every time I update it is temporarily fixed but after a few clicks or refreshes it's back ...
1
vote
2answers
78 views

renderTemplate() renders the twig file without any CSS

I've set up the routing for a specific URL in my plugin to trigger the actionIndex controller method. I after logging a message to the Craft logs, I want to return the rendered twig file as the view, ...
1
vote
2answers
227 views

background-image CSS property: how to do it right with Craft?

My current code is: #header { background-image: url('{{ sitePath }}/assets/toxicomental/header.png'); height: 150px; } Still, I don't get the image showing. What do I do wrong?
3
votes
2answers
170 views

Load a specific file/CSS only in a certain page

I want to load a .css file only in a certain page. What's the magic code I need?
2
votes
1answer
300 views

CSS will not load Craft 3 + MAMP

I'm a UX designer with some front end skills (though a complete novice with server config and Craft). I'm hoping someone can help me with something that seems rather basic. Setup: Mac Book Pro ...
1
vote
1answer
238 views

Navbar in Craft CMS

I'm currently doing some work on our new website, and I have water up to my chest. :) I'm trying to create a top navigation bar (dropdown) based on entries in CraftCSM to create the menu. I'm ...
1
vote
2answers
109 views

Homepage showing up as “index of \” page

I am uploading a repo that works fine on a staging server to a live server. When doing so however the homepage is showing as "index of \" page with the public and readme.md directories showing. Like ...
1
vote
2answers
218 views

Modify how the html fields are outputted by Redactor

Is there a way to modify how the html fields are outputted by Redactor? I'm creating an email template and I'm trying to add inline styles to Redactor's list items, links, etc.
3
votes
3answers
194 views

Best way to handle redesign of large site

I have no experience using Craft but will be redesigning a large site using Craft. Most of the content will not be moved or restructured, I'll mostly be making cosmetic changes with HTML and CSS. ...
1
vote
2answers
197 views

Plugin settings page in CP styling

I'm having issues finding out what all the classes are Craft uses to style its control panel. I have extended the layout but is there any place with more information about what classed there are and ...
4
votes
3answers
3k views

What is the optimal place to store CSS files?

I'm trying to figure out the best place to keep my one master CSS file in craft. I had the CSS linked in my template as link rel="stylesheet" href="../craft/css/master.css"> But now Blog entries ...
0
votes
1answer
214 views

Craft Admin CSS Broken..?

I have had Craft CMS installed for a while. then today, I created some new pages, and pushed them with git to the templates folder, added them in sections etc, then, when I go to edit the entry, it ...
4
votes
3answers
370 views

Ugly Redactor II and how to fix it with some CSS

Redactor II uses Trebuchet as font, has ugly paddings, giant font sizes and other things. This must be fixed...
1
vote
0answers
484 views

Craft Nginx Cache Static Resources - Css, JS Errors

I'm currently trying to cache css and js files with the widely known config as follows: location ~* \.(png|jpg|css|js|jpeg|gif|ico|xls|doc|zip|exe|mp3|mp4|pdf|ai|psd|eps|ppt|dmg|csv|key|numbers|cur|...
0
votes
1answer
306 views

How to add jquery.css file in Twig?

I am working on a project and the plug in I installed won't work because I don't know how to add the jquery.css file needed. What I did is to add the file with a <link> command but it's still ...
1
vote
1answer
225 views

Possible to Get grunt-uncss Working with Craft?

I'm working on a site that uses bootstrap so has a very large CSS file with many selectors that are not being used. To reduce the size of the file, I'd like to use the grunt-uncss task, but it does ...
3
votes
3answers
2k views

Force browser to download latest CSS file

Is there any simple way to automatically add a version number when referencing a CSS file? Example: <link href="style.css?v=VERSION-HERE" rel="stylesheet" type="text/css"> Version could be a ...
1
vote
2answers
324 views

Admin pages request a broken version of the craft.css file

We’re using Craft over SSL and everything is working fine apart from the admin fonts: This is due to a mixed content, because craft.css is requesting the fonts from non-ssl URLs: The CSS file ...
0
votes
1answer
120 views

Plugin development - Adding Foundation 5 CSS changes Craft CMS control panel

I am trying to embed a Google Map widget as a field in Craft. I am doing plugin development to achieve it. Adding a foundation 5 css in a PluginName_FieldType.php file into the getInputHtml() ...
4
votes
2answers
1k views

Newbie: Trying to understand includeCssFile

I'm a newbie to Craft and am working with a raw version of Craft CMS 2.6.2903 on localhost and am trying to understand some of the basics. The problem that I am encountering at the moment is to do ...
2
votes
1answer
323 views

Admin CSS missing from hosted site

The development site works locally, but on a live hosted server the admin CSS is missing. The admin JS shows up. The public-facing site works fine on the live server and I can log in to the admin area,...
0
votes
1answer
683 views

CSS doesn't load on the live server

As I put the CSS files on the public root folder of the live site, the CSS doesn't load on the live site.
2
votes
1answer
382 views

Craft loading SCSS references rather than CSS

I am looking at a site at the moment which uses SASS to compile its CSS file. All styling references appear to be referencing the styling from the SCSS file, rather than the CSS file. Previously, all ...
1
vote
1answer
278 views

Plugin Stylesheet 404

Hey guys I have created a plugin with an accompanying Stylesheet which I am adding to the page via class SitemaphtmlPlugin extends BasePlugin { function init(){ craft()->templates->...
2
votes
2answers
214 views

How to set multiple 'active' classes from query string

I'm outputting all tags that are in use and then allowing the user to click these build up a query string to filter and display the results. It's all working fine. Except, I'm having difficulty ...
0
votes
1answer
268 views

Image transform in inline background css not being generated

In my backend I have a radio button field with 2 options for the client: Normal and cover. When selecting normal, the uploaded image is put into an tag in the HTML and an image transform is applied. ...
1
vote
1answer
669 views

Do Remote Assets (ie. S3) have file paths?

New to remote assets, and can't seem to find any information on accessing remote assets via filepath in areas twig can't be used, such as CSS. I'd like to be able to use those same assets in CSS files ...
1
vote
2answers
836 views

What are best practices for using Matrix fields to establish a grid layout

I am using a Matrix field for content blocks like heading, text, images, ... similar to the HappyLager demo site. Now I would like to combine this with common CSS grid systems (e.g. from Bootstrap, ...
2
votes
1answer
529 views

How does one achieve drop-left or drop-right image position?

How is one to achieve the layout visualised by Craft's drop-left and drop-right icons? I feel dumb asking but I don't know of any way to have a floated image stick to the bottom of its sibling text ...
2
votes
2answers
173 views

craft.entries and :first-letter

I want to display the first character in a paragraph with a drop cap. It works fine with normal text or setting it with js, but when I use an entry field it doesn't pull out the first character. The ...
1
vote
2answers
31 views

Extra margin in Default System on subpages like news

On the default install, taking out all css. There is an extra margin space at the top of Chrome, and IE Edge but firefox is fine. I also checked out the error 404 page, and it too is fine like the ...
1
vote
1answer
106 views

Issues loading files from within css files

i just started using craft on a local domain and i have some issues. my stylesheet(a few files) are loaded using html<link rel="stylesheet" href="style/style.css">, and it works great for css ...
0
votes
1answer
155 views

Dynamically load either standard res or hi-res background image

I am currently dynamically loading a background image using the style tag: <li style="background-image: url({{ project.portfolioImage.first().url }})"> I want to add support for retina ...
1
vote
2answers
116 views

Enable the user to upload multiple background Images that come from a matirx loop

I am trying to enable the user to have mutliple full width css background images, my loop works going through the matrix and grabbing the images but the trouble is they all have the same css class mid-...
1
vote
1answer
308 views

“Giving your Plugin its own CP Section” What about the CSS?

I'm working on a plugin with it's own CP section as described in the docs here. What is the appropriate way to include CSS styling for that page?
1
vote
1answer
2k views

Problem loading css files in some templates

I´m having problems loading css files in some templates. Hi have this to load css files: {% includeCssFile "assets/html/css/reset.css" %} {% includeCssFile "assets/html/css/general.css" %} {% ...
1
vote
0answers
382 views

Is it Possible to Connect a Custom Stylesheet to Redactor via the Config? [closed]

I am running into an issue with Redactor in Craft and I am wondering if anyone can help me sort it out. I am trying to set up multiple rich text fields with different stylesheets connected to each. I'...
1
vote
1answer
945 views

Enable the user to upload background Image

How do you enable a user to upload a css background Image? Do you write some inline css in the page header with twig markup? Do you write some twig markup inside a css file? Or do you fake a ...
2
votes
1answer
158 views

Hiding my plugin table columns for mobile

My custom plugin uses a table to display each of my results, works as intended. However, on the mobile device the table does not layout properly as the table has 6 columns. I know this is a rather ...
0
votes
1answer
88 views

Strange Font Issue with Control Panel [closed]

There seems to be an issue with HelveticaNeue in chrome, on Windows 7. If I manually edit the fontface using dev tools I can get the text to display in the default font. Doing a bit of searching ...
4
votes
1answer
2k views

Serving CSS files from template folder

Is there a way to serve my CSS files from the templates folder? I am wanting to be able to use TWIG tags, etc to build some of this. And even if the TWIG tag idea does not work out, I would prefer ...
1
vote
2answers
397 views

Is there a way to use the includeCssFile tag to include a css file for print media?

{% includeCssFile %} can be used to add "regular" css files in the head tag. Is it possible to use this tag for print media?
3
votes
1answer
4k views

Where should I put custom CSS files?

I am a little puzzled by the way craft handles CSS files. Although I am used to working with SCSS and CSS assets and setting up a reasonable directory structure, I was expecting a little documentation ...
1
vote
1answer
159 views

trying to use loop.length with some dynamic css

I'm using CSS calc to help make my links the proper width and still account for the margins that separate them. The number of links here will vary between 3 and 5 and I wanted to not have to update my ...
2
votes
3answers
500 views

Need to create dynamic CSS names for buttons

This may not be the most efficient approach for this specific case but I'm trying to learn how this might be done for other similar problems I might run across in the future so bear with me here. I ...
3
votes
2answers
559 views

Markdown filter, how to add HTML attributes?

What's a good way to add attributes (classes etc.) to the HTML elements returned from the markdown filter?