Issue #2057💬 AnsweredOpened May 31, 2019by alikabeer321 reactions

Media Queries do not apply on a custom block I wrote

Quick answerby alikabeer321

@alikabeer32 I'm facing the same issue. If you solved this issue. Can you please share the solution here. Thanks @umerrinayat I don't remember what I did but try the following: You need to define the css class and add a unique id to it ```js const cssComposer = editor.CssComposer; var sm = editor.SelectorManager; var...

Read full answer below ↓

Question

I wrote a simple div block like so blockManager.add('simple-div', { label: 'Container', content: '"<!––<div class="simple-div"></div> ––>"', category: 'Basic', attributes: { title: 'Simple Box', class: 'fa fa-square' } }); But it is NOT responsive whatsoever. This is how it is: 1.I set it's width 100% on desktop 2.I switch to tablet and set it's width 50% 3.I switch back to desktop and the width is still 50% There are also no media queries in the CSS (media queries work fine for images) Am I missing some code that allows it to be responsive? EDIT I just realised that that the styling is being...

Answers (2)

alikabeer32December 6, 2019

@alikabeer32 I'm facing the same issue. If you solved this issue. Can you please share the solution here. Thanks @umerrinayat I don't remember what I did but try the following: You need to define the css class and add a unique id to it ```js const cssComposer = editor.CssComposer; var sm = editor.S...

umerrinayatDecember 6, 2019

@alikabeer32 I'm facing the same issue. If you solved this issue. Can you please share the solution here. Thanks

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.