D
D
drtvader2015-11-03 11:35:28
css
drtvader, 2015-11-03 11:35:28

How to style a div that is generated by javascript?

<ul class="bxslider"></ul>
There are several bxslider carousels on the page, most of the divs are generated by a script, how to style them correctly via css so that the styles of other sliders do not touch.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yaroslav Lyzlov, 2015-11-03
@drtvader

Make a wrapper over those divs that need to be styled

<div class="bxslider__wrapper__1">
   <ul class="bxslider"></ul>
</div>

bxslider__wrapper__1 .bxslider { /* styles * }

I
Ivanq, 2015-11-03
@Ivanq

For starters, as dixoNich and Nikolay said . Don't want that -
elem.style.backgroundColor = "red";

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question