This is probably exactly the same thing. As i mentioned in my initial post, the divs don’t all get the id “customdiv”, the id is made up from the elements name in Lectora. So if the element is called “mydiv1” that will be the id. If you copy it, there’ll be another div with the same id. If you rename the copy you’ll be fine.
Tim, what I’m saying is that I think there is an error in your example. There is no conflict of names in any of the code as long as you provide unique ID’s in the DIV’s you create. Look at the sample I posted. I believe in your example you assigned an ID of “myid” to 2 DIV’s. Try naming them differently and you should be fine.
thank you very much for the example. In my title, there are only two divs: the “Custom Div” (the Lectora element) itself (id = “customdiv”) and the div I’ve inserted in the custom div (id = “myId”), so no two divs with the same id.
The issue I wanted to mention is (just), that Lectora is not following its usual way of using the html name for the id of the “HTML Extension (Type: Custom Div)”. In your example the issue is not occuring because you renamed the two elements to “myDiv_1” and “myDiv_2”, but it would have happened if you had left the default name “Custom Div”. Normally the ids of your Custom divs should be “other47” and “other53” (their html names). Now i just mentioned that the last update brought a different default naming for HTML extensions, that includes numbering. They still use the elements name instead of the html name for the id, but at least the names are unique by default.
Thanks for your patience and for clarifying further; I can be a little dense.. Unlike regular HTML authoring, I rarely copy and paste elements in Lectora. That sometimes gave unexpected results in ToolBook, the prior application I used to employ for e-learning authoring. I suppose the rule of thumb for custom DIV’s should be don’t copy and paste them and make sure you provide each an ID. You also touched on one of the original points I was making. You mentioned that the naming convention changed with the last update. That could be problematic for reusing scripts and style sheets.
I agree on all points. I have run across a situation before where the published file wrapped an object in a div, but then in another release it was a span (or vice versa, can’t remember which), but would break any jquery or css that targeted that way. I’d also add it would be great to not have any additional css styling on external html divs …the clipping mask that was added was kind of a pain.