Questions tagged [css]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
3answers
133 views

CSS file not being read by other templates

So I am making a new craft cms website, I have my page entries linked to the template pages/_entry.html, which works fine. I then made another type of pages called news, linked to the template news/...
0
votes
0answers
36 views

CSS and JS tags with custom version parameter

When using {% css '/path/to/file.css' %} craft adds a v= query parameter by itself so that it comes out like this: <link href="/path/to/file.css?v=1612895916" rel="stylesheet"&...
1
vote
1answer
34 views

Multiple Queries with differing CSS in Paginated output

{% set query = craft.entries.businessAddress(params).orderBy('Premium desc, distance').limit(12) %} {% paginate query as pageInfo, pageEntries %} <div class="row"> {% ...
2
votes
1answer
89 views

Redactor: Set a min height and preserve line breaks

I'm looking to set a min height on the redactor text area. The vendor site shows how it can be done, but doesn't specify where to add this code snippet. $R('#content', { minHeight: '500px' }); I ...
1
vote
1answer
145 views

How to make field instructions show as tooltip?

How to turn show as the following style
1
vote
1answer
175 views

Use Craft globals for CSS styles

Is it possible to pass a value from Craft global setting into a CSS/SCSS file? So for example I want to be able to allow the end user to customise colours and fonts without having to include it inline....
0
votes
0answers
80 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
291 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
369 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
613 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
3answers
564 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
657 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
401 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 ...
2
votes
2answers
231 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
566 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
238 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
251 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
5k 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
275 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
491 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
500 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
352 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
291 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
475 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
167 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
428 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
1k 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
616 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
307 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
330 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
306 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
800 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
945 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
613 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
208 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
32 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
145 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
171 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
139 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
322 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
415 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
1k 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
165 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
98 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
3k 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
446 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 ...