Questions tagged [css]

Questions related to CSS in the context of Magento

3
votes
0answers
120 views

In Magento 2, what is the best practice for loading some CSS for a custom widget, so that the stylesheet only loads when the widget is present?

I have created a Magento 2 widget that displays a list of categories, similar to the one shown in this guide. The widget outputs the correct HTML, so now I need to add some styling to it to make it ...
3
votes
0answers
294 views

Magento 2.1: Adding Custom Css to Admin Ui Component Form

I invested a couple of hours to get a solution to figure out , that how can we customize the M2 admin form - for the sake of clarity please see the below screenshot: The default admin form fieldsets ...
2
votes
0answers
37 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 ...
2
votes
0answers
132 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 ...
2
votes
0answers
50 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 ...
2
votes
0answers
18 views

Backend login page can't display correclty

After transferring to a new server, the backend login page can't load correctly, but the frontend works well. You can see the links of CSS and JS files are not correct. And the login button can't load ...
2
votes
0answers
103 views

Best practices adding css/less to custom widget block

I created a custom widget inside my module and I'm trying to figure out how to add css to widget template. I can do it with the styles tag inside my template (phtml) but I assume that is not the right ...
2
votes
0answers
32 views

Magento2: css file modification does not apply

I am using Magento 2.2.4 and I need to design my website with the size of 70%. I am trying to override the css by a theme /custom_theme/web/css/style.css file as follows. But it didn't work. How to ...
2
votes
0answers
71 views

Plugins less with Magento Theme

Good morning, I would like to know if somebody has worked with less plugins in Magento Environment? Indeed, I met no difficulties with grunt tools, but when Magento compile all files (through setup:...
2
votes
0answers
43 views

Adminthtml failing to compile

We have an ongoing issue with our styles.less file that prevents the css being generated for the Magento 2.1.8 back end. Whe i run the command bin/magento setup:static-content:deploy It throws ...
2
votes
0answers
1k views

Get base url in css file

Is there a way to load base url for background-image in css file? for example: background-image: url('{base_url}/myimage.jpg'); background-repeat: repeat;
2
votes
0answers
110 views

Adding scrollbar in category dropdown

I add 1 category name Category, and add sub categories to it. But, because there's too much sub categories, i need to scroll down the page first to see the full list of the sub categories. So my plan ...
2
votes
0answers
139 views

Magento 2 : New Order Email Template CSS Not Working in Production Mode

I am facing issue in sales new order email template. I am working with my custom theme. Problem is there, new order email template CSS working in developer mode correctly but same template not working ...
2
votes
0answers
160 views

Set empty design layout for a controller

I've created a controller that is displaying some html code retrieved from orders.phtml file : <?php class Envato_RecentProducts_OrderController extends Mage_Core_Controller_Front_Action { ...
2
votes
0answers
346 views

How to change radion button and checkbox in magento 1.9.2.1 - with images, and the use of :checked or :visited

Im trying to change the radio buttons, so different <label for=""> display an image. I would also like it to change the image with a new image, when the radio or check-box has been selected or ...
2
votes
0answers
388 views

Different CSS Styles for Menu Icon

Is it possible to tell Magento to do pick-up different CSS styles for something that appears throughout (such as the header?). For example, a website I am working on features a 'MENU' icon over an ...
1
vote
0answers
14 views

How to configure Category product listings in Mobile?

We knew the steps to configure the product listings in Magento 2 on Desktop view and done successfully as per our need. Now, we wanted to show 2 products per row in portrait mode and 3 products per ...
1
vote
0answers
13 views

how can i override my core CSS file class according to my custom _module.less?

This is my table in configuration and down there is core css class for that with name ".accordion .config .value" i want to change the width of that class from 44% to 100%. I have my custom _module....
1
vote
0answers
16 views

Custom CSS in the admin panel

We have installed Venus theme Megamenu PRO plugin into Magento 2 site. After installing it, we can see that they are providing an option Custom CSS to write CSS into the admin panel. Please see the ...
1
vote
0answers
19 views

How to edit responsive.less file in theme magento 2?

I setup unero theme which has responsive.less file in the dire web/css/responsive.less. I need to edit this file. first I took a copy of that file and past it to my theme dire which is app/design/...
1
vote
0answers
25 views

How to Dropdown navmenu on hover

I just add a new line of html code to navbar... now the navbar is not open on hover, i do have to click on the nav and to close, i have to click it agan. But what i want , is that the nav open it by ...
1
vote
0answers
44 views

Magento 2.3.0 Admin grid using UI component sticky CSS is not working

I have created a grid using UI component. in this grid, I display only grid I don't need to display button <buttons></buttons>. gird is working perfectly when I scroll down in grid page ...
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) { ... } //...
1
vote
0answers
10 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 ...
1
vote
0answers
66 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
18 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
33 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
0answers
30 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 ...
1
vote
0answers
235 views

display a popup once per day!

this code is to display a pop up once per day. But I'm having trouble making it responsive, and it seems that it shows once a lifetime... Also if I put it in 3 different pages, and it only shows up ...
1
vote
0answers
72 views

Magento CSS Forbidden

After the site has been properly working for awhile (year or so)... we get 403 Forbidden errors on CSS files hosted locally on the server. Changing permissions on the directories and files didn't work....
1
vote
0answers
79 views

How to make vertical navigation collapse per category?

Please check as example https://www.uitverkoopgigant.nl/eglo-tarbes-hanglamp-9002759941918.html. Its made in Magento 2. Here you see that the category colapse all subcategories. How can I make it so ...
1
vote
0answers
47 views

Error in css and js in child theme in Magento 1

I'm having a problem loading style sheets and scripts. I created a child theme, and I did not add any css or js to it. Even so, the magento looks for them in the son theme instead of the father. I'll ...
1
vote
0answers
173 views

Short Description and long description are not responsive on product page of Magento 2

I am currently facing an issue with the responsiveness of Magento 2 product page. My descriptions are passing the browser screen toward the right side. They are showing up like this in the attached ...
1
vote
0answers
46 views

ifconfig does not work in <css /> tags in Magento 2

ifconfig does not work in <css /> tags in Magento 2. 0 (Magento\Framework\Config\Dom\ValidationException): Element 'css', attribute 'ifconfig': <page xmlns:xsi="http://www.w3.org/2001/...
1
vote
0answers
68 views

Change the size of the column in product detail page

I am using Magento 2.2.4. I need to change the size of the column for product description under the id="maincontent". I need to make it 70% of the width and align center. I am writing a custom theme ...
1
vote
0answers
25 views

CMS Page Rules Applied to a Blog Post for Magento 1.9

We have different CSS settings for a typical CMS page vs. a Blog post. I would like the format and style from CMS applied to 1 blog post. What do I need to capture to add this inline for the blog ...
1
vote
0answers
229 views

Change default Magento 2 theme to use a boxed layout instead of full width?

Change default Magento 2 theme to use a boxed layout instead of full width? I'd like to change my Magento 2 theme to use a boxed layout instead of a full layout. I've already started customizing the ...
1
vote
0answers
70 views

In admin css not loading

In my admin panel css is not working. If I use internal css in inspect element than its work and its working fine in localhost also.
1
vote
0answers
67 views

Merge Account dashboard with Account information

How can I move my Account Dashboard information to Account Information (merge them together) I want to show: Contact Information Default Billing Address Default Shipping Address Account Information ...
1
vote
0answers
124 views

Magento 2 Custom CSS and JS on CMS page

I need to add a CSS/JS and HTML to CMS page is that even possible? I wrote a "Calculator" offline, styled it and now facing a problem. How can I add the JS/jQuery and CSS to a CMS page so I can keep ...
1
vote
0answers
145 views

2.2 Faster way to regenerate css in developer mode

In developer mode, static files are mostly symlinked so making changes is immediately visible in frontend. However, when making changes to CSS this is not the case. The minimal files I have to ...
1
vote
0answers
91 views

Getting Mage in the link of image in Product View Page

I have created a custom theme and placed an image in the theme's web/images folder i.e web/images/abc.png I have used this image in the css as background: url("../images/abc.png"); Image show in ...
1
vote
0answers
30 views

Table text size larger then normal after moving server

I have recently moved my Magento installation to a new server and for some reason, the text in certain areas is larger then it used to be. As if the CSS is not working. Anybody have a clue as to why ...
1
vote
0answers
172 views

Dynamically hiding or showing a store configuration menu tab in Magento 2

Is it possible to show or hide a tab dynamically within the store configuration menu depending on a condition? I'm writing an extension using an OAuth 2 token, and want to hide tabs in the menu if ...
1
vote
0answers
23 views

Custom extension to fit with existing theme

I was wondering. If someone creates an extension, lets say the extension would show recommended products then how will the developers of that extension make sure that it would fit with customer's ...
1
vote
0answers
27 views

M2 - Have client be able to edit/change header on each CMS Page?

I have a client that wants to be able to change the header themselves through the admin (with css) so it can be different on each CMS page. They want this because their current header is transparent,...
1
vote
0answers
98 views

Exclude CSS/JS file For IE browser from magento 2 XML

How can i exclude a CSS file from XML for IE browsers
1
vote
0answers
454 views

Magento2 - CSS merge not working at all

has anyone encountered this problem? Merge CSS is not working at all altough minifying does. I'm still in Developers mode, but it's also not working in Production mode. I tried: php bin/magento ...
1
vote
0answers
1k views

bootstrap into luma extended theme - magento2

I created theme that extend luma. I have integrated bootstrap into magento using this link after that product detail page and page header alignment are not nice. Due to commonalities between these ...
1
vote
0answers
199 views

Custom styles not work in new theme Magento 2

Read a lot: Create a storefront theme My steps: Create a theme directory app/design/frontend/My-vendor/default Copy all files from vendor/magento/theme-frontend-luma to app/design/frontend/My-vendor/...