I have a graphic on my page and will be imposing some links over it.
<p><img src = "ind-pict-05.png" alt = "ind-pict-05.png"
class = "webresponsive"
style = "width:100%; position:relative;
z-index:0; "></p>
<div style = "position:absolute;top:15%;left:59%;width:16%;height:81%;
z-index:1;border:2px solid blue">
<div class = 'rainbow'>
<a style = "cursor:pointer" onclick = "window.open('ind-acct.cfm')"></a></div>
<div class = 'rainbow'
<a style = "cursor:pointer" onclick = "window.open('ind-donor.cfm')"></a></div>
</div>
And the css:
.rainbow {
margin-top:1%;
height:7.4%;
border:2px solid red;
}
This works.
In in the image, the blue box shows that everything is properly positioned, and the red boxes, the div's that contain the links, also show correct positioning. (These debugging tools will be dropped in the final version.) The links are working correctly.
There will eventually be 12 red boxes, so I thought I would put it in a loop. Trying with just two boxes the code is:
<cfset linkarr = ListToArray('acct,donor')>
<p><img src = "ind-pict-05.png" alt = "ind-pict-05.png"
class = "webresponsive"
style = "width:100%; position:relative;
z-index:0; "></p>
<div style = "position:absolute;top:15%; left:59%;width:16%;height:81%;
z-index:1;border:2px solid blue">
<cfoutput>
<cfloop array = '#linkarr#' index = 'abc'>
<div class = 'rainbow;'>
<a style = "cursor:pointer" onclick = "window.open('ind-#abc#.cfm')"></a>
</div>
</cfloop>
</cfoutput>
This does not work. The div class = "rainbow"and associated link do not appear.
The developer tool is showing the code in place, although it is not showing any formatting except what is inherited from the top div (not shown here):
Can anyone tell me why writing out each individual link works, but looping through the links is not working?


