Issue #2601Opened February 26, 2020by cristianumali221 reactions

[QUESTION/BUG?] Dragging second block don't haveCSS

Question

Hi! I've manage to create different blocks with their own HTML and CSS using BlockManager. But once I drag the same block, the CSS is not working. I've already debug it. And I found that its renaming the my blocks' id. Example. I have a table with an id of custom-table. And when I drag the same table, the id becomes custom-table-2. But the css with a selector of #custom-table does not change. So it will not get the style. How to fix this issue. Thank you

Answers (2)

rjrodriguezalvarez97March 2, 20201 reactions

Try styling with classes as selector rather than ids

artfMarch 3, 20200 reactions

You can't have multiple elements with the same ID (against also HTML5 specs) so the editor tries to fix that, so yeah, you have to use classes

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.