The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [css]

Questions related to CSS in the context of Magento

Filter by
Sorted by
Tagged with
2
votes
1answer
33 views

Load css on condition

I need to a CSS file based on customer attribute when the user is logged. How can I do this ? Readed this : https://mage2.pro/t/topic/140 but it's based on backend config.
0
votes
0answers
21 views

How to properly write media query for mobiles on Magento?

I have been working on the compatibility of our client site but I'm really confused in writing media query for mobiles. The thing is that I have read in Magento devdocs and also many posts regarding ...
0
votes
1answer
477 views

Magento 2 Theme Development - grunt watch not detecting changes of custom LESS file

We are running Magento 2 in version 2.3.1, but the error occurred in version 2.3.0 also. The situation is the following: we've created a custom theme which has Magento/luma theme as parent. according ...
0
votes
0answers
57 views

Adding Css Class to Checkout Form Magento 2

In my custom theme, I moved summary sidebar on the checkout form. Now I want to apply some css for styling and alignment. So when I add my custom css class it does not affect at all. I also applied ...
0
votes
1answer
34 views

Adding/Updating CSS in Magento

We have extended basic Magento Luma theme. Currently, we are working on the compatibility of the site in various browsers. I have read many posts regarding media query using on Magento. Below is for ...
0
votes
1answer
32 views

why button not showing in custom theme in magento 2?

when i go customer login and customer module and custom_module related pages button is not showing when i move a mouse over that button the button is showing how to solve this css color ...
0
votes
2answers
33 views

Magento 2 image not found

I'm writing a callback module and when i try to insert image like following: a#popup-button{ display: block; width: 50px; height: 50px; background: url("../...
2
votes
0answers
45 views

Magento-CE-2.3.0-2018-11-27-10-23-08 CSS

I have installed the above version of Magento 2 (no sample data) onto my 1an1 hosting site. No errors on installation however, the stylesheets are not loading. I've tried a few suggestions to fix via ...
0
votes
1answer
313 views

Magento 2 add Custom CSS and JS file in admin panel

How can add CSS and JS File in admin panel of specific page.too many pages in admin panel e.g product,sales->order ,order view ,invoice,ship etc . . . I want to load 1 CSS or JS file in New Invoice ...
2
votes
1answer
114 views

How add custom js and css to registration page in Magento 2

I created a module for Magento 2, with two files to add to the user registration page: app/code/MyModulespace/ModuleName/view/frontend/web/css /mycss.css app/code/MyModulespace/ModuleName/...
1
vote
3answers
26 views

Magento2.1.14: Css not loaded after upgrading apache 2.34 to 2.37

I have upgrade apache 2.34 to 2.37. Then I have the problem that all css and js files are only throwing a 500 error and are not loaded. I have got this error on error log: option followsymlinks not ...
3
votes
1answer
274 views

Magento 2: How to change background color on products list?

I want to change the color of the background from white to grey on products list. Here is style.css // Products Grid .product-item .mage-error { display:none !important; } .product-image-photo....
1
vote
1answer
47 views

How to override top menu css in Magento 2?

I want to override top menu CSS and replace it with my own CSS. I don't know which CSS file is responsible to display top menu. I only need to override CSS and don't want to make any changes to ...
1
vote
1answer
119 views

I just implemented Bootstrap 4 in my magento 2.2.5 website. Require.js 166 Error

In my environment implemented Bootstrap 4 in Magento 2.2.5 at first glance it seemed to work. all of my js and css worked perfectly without any error's. But after sometime, I got error: Uncaught Error:...
4
votes
3answers
481 views

css not loading in owl carousel magento 2

hello guys i am trying to use owl carousel in phtml file in console it shows error regarding css Following is my default_head_block.xml file which is a layout file <?xml version="1.0"?> <...
0
votes
1answer
235 views

Magento 2 Add css class to <a> tag in customer account navigation

I try to assign a CSS class to navigation ( tag) under customer account page. I found this file customer_account.xml, and I added <argument name="css_class" xsi:...
3
votes
0answers
192 views

Magento 2 dropdown on hover menu issue

On hover, Magento 2 gives a dropdown functionality, like megamenu, cart, and My account drop-down. The issue on the hovering the dropdown or pop up menu appears fine but when I remove my mouse and ...
0
votes
0answers
10 views

Plugin to make a Magento website as Mobile Responsiveness magento 2

I'm wondering to ask that is there any plugin available to make Magento 2 website as a Mobile Responsive? If any plugin is available, please let me know.
0
votes
0answers
26 views

Website design collapse in android mobiles

We have written media query for android mobile devices which have the resolution (360x640) as below: For portrait: @media screen and (device-width: 360px) and (device-height: 640px) and (-webkit-...
2
votes
2answers
423 views

Magento 2.3 : Css files not generating while static content deploy

In File.php line 150: The contents from the "D:/projects/directory/m2/pub/static/frontend/Smartwave/porto/en_US/css/styles-l.css" file can't be read. Warning!file_get_contents(D:/projects/directory/...
0
votes
1answer
111 views

Media query conflict

Currently, we are working on the compatibility of our client site. We have started this from the resolution 375x667 and completed it. After that, we have started to write media query for the ...
0
votes
0answers
22 views

Trying to add an external CSS file to a specific CMS page in Magento 2.2.5

I can't seem to get external CSS file to load on a specific Magento 2.2.5 CMS page. My current XML layout update code is this <body> <attribute name="class" value="stacked"/> <...
2
votes
2answers
751 views

Magento 2.3 CSS inlining error: DOMXPath::query() Invalid expression in selector >> .fotorama__wrap:not(.fotorama__wrap--toggle-arrows)

I am getting this error in Magento 2.3. Error occurs with every email sent. CSS inlining error: DOMXPath::query(): Invalid expression in selector >> .fotorama__wrap:not(.fotorama__wrap--toggle-...
1
vote
0answers
16 views

Closure Compiler support

It seems there are several performance extensions for Magento 2 but none of them mention Closure Compiler which still yields the best results compared to the current minifier. The extensions which I ...
2
votes
1answer
24 views

iPhone Compatibility check

We have written media query for iPhone resolution for our site. Now, we want to check it in real iPhone devices but we don't have an iPhone. However, we have Mac Laptop, is it possible to imitate ...
2
votes
0answers
80 views

Magento 2 : Simply want to change the text colour on my checkout page

Sorry for what is probably another daft question but after 2 hours of trying to work out how to make a simple change, I've admitted defeat! My proceed to checkout button is on a white background so ...
1
vote
1answer
33 views

CSS not reflecting after modifications

I'm new to Magento 2 I have an edited CSS file somewhere in app/design/frontend//web/css/, then I run the deploy static content command. I can see the new CSS file is already in pub/static/ folder. ...
1
vote
2answers
268 views

Fresh Magento 2.3.0 installation no CSS

Just installed Magento 2 on a shared server, everything seemed successful, no errors, but the shop looks like this (css files not found, they return 403 Forbidden, but the files are actually missing): ...
1
vote
1answer
73 views

proper way to use .less files in custom theme?

I've followed a number of guides to properly setting up .less files in a custom magento theme and nothing seems to be working. I've read these threads on here: how to automatic update file `.less` ...
1
vote
0answers
73 views

CSS and JS merging options is not working on Magento 1.9.2.4

I am simply trying to enable the option of merging JS and CSS on configuration > system > developer and I have cleared the cache and even tried to delete the VAR folder and still having CSS and JS not ...
1
vote
0answers
19 views

Magento 2: Want to add versioning in style.css

I want to add style.css?v=1.1 but when i add these version it call at the end of all other css files which distort website design. so what should i do?
1
vote
0answers
273 views

How to defer unused CSS and avoid an excessive DOM size in magento1.9?

How to defer unused CSS and avoid an excessive DOM size? Any one knows how to defer unused css and avoid dom size in magento1.9 using pagespeed?
0
votes
0answers
480 views

Magento 2.3 Static Content Deployment problem & missing css file

Running Magento 2.3 i noticed a problem with the static content being deployed, well, I believe it to be that anyway. I was messing around with Varnish for a few days and had a nightmare getting it ...
0
votes
1answer
105 views

Adding styles before style-l.css

I got the answer in this link Load Custom CSS After style-l.css For Home Page it's working only in the home page I needed it to work in each and every page please help me with this
0
votes
1answer
42 views

Keep getting <style> for css file and not actual file - trying to use Gulp sourcemaps

So I have updated the default_head_blocks.xml file with my css file like so and the theme loads the CSS. <css src="css/master.css" /> This is my gulpfile. const gulp = require("gulp"); const ...
0
votes
0answers
30 views

Magento 1.9.2. - JS and CSS that block the view above the fold

I'm searching the web for a definitive solution to the "problem" that google reports when i test the speed of my site on Google PageSpeed. Magento's JS and CSS block the above-the-fold view and I ...
0
votes
1answer
125 views

Magento 2 Load _extend.less last

I am using a custom theme and then a child theme for the custom theme. I believe the easiest way to overide the themes css is to use _extend.less in the <MYCOMPANY>/<MYTHEME>/web/css/...
0
votes
2answers
89 views

how to load css file just before body instead of head

Below is code of my default.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/...
0
votes
0answers
30 views

Perfomance - pagespeed magento 2 inline add css used in page

I am facing defer parsing issue in Magento 2 due to which I want to inline all css used, Is there way I can do it as like in other cms - wordpress / drupal i can not find option to inline css? Please ...
0
votes
1answer
109 views

CSS / JS Not Loading on FrontEnd after flushing Cache with Custom Theme

I'm having issues with getting my custom Magento 2 theme to compile correctly. I installed it on a remote server and configured it. All is working on that end. I can flush the cache and deploy the ...
0
votes
1answer
46 views

How to make custom CSS have priority over CSS defined in head.phtml in Magento 2?

I'm sure many of you come across this issue: in some third party themes, many predefined styles and css generated from theme configuration (located in pub/media/{theme}) are loaded in /{vender}/{...
0
votes
3answers
108 views

Magento2: How to center box with price, product name etc

I try to center box with product details: So, in list.phtml I found code responsible for this box. <div class="product details product-item-details"> <hr /> ...
0
votes
2answers
95 views

Do I have to be in developer mode?

How to add custom css file in magento2.2.6? I am in Production mode, using Luma Magento 2.2.6. Do I have to be in Developer mode to make the solution in the above link work? Before switching to ...
1
vote
0answers
49 views

Magento 2 - CMS Specific page_layout XML and Dedicated page_layouts in general?

I'm looking for some BEST PRACTICES insight into using page_layout.xml. Is it a good idea to try and decouple the non-shared resources on Product Pages, Category Pages and CMS Pages? If so, what's the ...
1
vote
3answers
58 views

How to add jss and css in magento2

I have created a block and called it in my phtml file then I call that block in my cms page like this {{block class="Abc\Custom\Block\Product" template="Abc_Custom::product.phtml"}} and some HTML ...
0
votes
0answers
44 views

Grunt Causing High CPU Usage

I Have installed Grunt on server. When I hit URL after less files changed the CPU Usage goes up-to 99-100%. The server is Linux. The changes gets reflected correctly. The issue which comes after first ...
1
vote
1answer
22 views

Magento - Should I stop to write JS/CSS directly in the backend in CMS pages?

In Magento you can create CMS pages. It is also possible to add CSS and JS code, directly to the page, which I sometimes do for rather smaller changes and style fixes and such, because then that ...
0
votes
1answer
14 views

css not loading when change admin language

After I changed the language in admin panel the css in backend didn't load. I have tried different language Any ideas?
1
vote
0answers
31 views

Mega menu issue with product zoom

I am using Magento 2.2.6 on the product page, When you view a product, and then you go to Products Menu, once the mega menu is shown up, move mouse to the menu item over the product picture area, then ...
0
votes
3answers
588 views

Failed to load resource: the server responded with a status of 404 (Not Found). How to solve this issue?

I am running Magento 2.3 with NGINX, PHP7.1 and MariaDb. This is a fresh instalation with pre-loaded data. I am getting these follow error: $ tail var/log/system.log [2019-01-09 16:36:24] main.ERROR: ...