Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [css]

Questions related to CSS in the context of Magento

2
votes
1answer
21 views

Defer JS / CSS Magento 2 via layout files?

After reading a lot of devdocs, I can see there is case for defer in CSS and JS in the manual https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-types.html#layout-types-conf ...
0
votes
0answers
10 views

Bundle label display

How do I display a label overlay for thumbnails, on bundle products? Is this difficult or should I find a extension. Thanks for help. Best regards Martin
1
vote
0answers
15 views

Magento2 CSS groups in styles-m.css in wrong order

my themes "_extend.less" file looks like this: //common & when (@media-common = true) { ... } //mobile .media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) { ... } //...
4
votes
2answers
48 views

Menu that open by itself after clicking on the link of a parent category

When I click on parent category, the page load but the menu re-open if the pointer of the mouse is still present. What do you recommend so that the menu does not re-open immediately ? I found PHP of ...
2
votes
1answer
18 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
19 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
32 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
25 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
31 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
0answers
16 views

image get hide behind content in mpdf8 [migrated]

I am adding image on existing pdf overlay on one box. here is my code $sign .= '<img style="height:'.$coordinates_eqv[4].'px;width:'.$coordinates_eqv[3].'px;margin-left:'.$coordinates_eqv[1].'px;...
0
votes
1answer
26 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
28 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
29 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
47 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
53 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
20 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
42 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
39 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
36 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:...
2
votes
3answers
84 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
37 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:...
2
votes
0answers
44 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
25 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
1answer
173 views

Magento 2.3 : Css files not generating while static content deploy

In File.php line 150: The contents from the "D:/projects/zubaidasonline/m2/pub/static/frontend/Smartwave/porto/en_US/css/styles-l.css" file can't be read. Warning!file_get_contents(D:/projects/...
0
votes
1answer
34 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
13 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"/> <...
1
vote
2answers
148 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
9 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
19 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
45 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
20 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
100 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
21 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
34 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
17 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?
0
votes
0answers
136 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
172 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
39 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
24 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
18 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
32 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
0answers
19 views

Magento 2.3 Blank Theme mobile Category Page only 1 product per row

My custom theme inherits from Blank Theme. On mobile-phone screens I want to show only 1 product per row on category pages. Can anybody help please?
0
votes
2answers
25 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
25 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
42 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
25 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
44 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
56 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
30 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 ...