[Chameleon] legend template widget scrollbar

Jason Fournier jfournier at dmsolutions.ca
Wed Nov 17 20:38:16 EST 2004


Jennifer,

The simplest is the following:

<div id="legendWrapper" name="legendWrapper" style="height:300px; 
width:200px; overflow:auto;">
  RELEVANT CHAMELEON WIDGET TAG (ie, legend)
</div>

This would be considered an inline CSS style on the legendWrapper div. 
Typically you'd create either a class or definition in your CSS 
files/style declarations at the top of your template (between 
<style></style> tags in the head).  eg:

<style>
#legendWrapper {
height:300px;
width:250px;
overflow:auto;
}
</style>

---OR---

<style>
.legendClass {
height:300px;
width:250px;
overflow:auto;
}
</style>

and then apply this to the div:

<div id="legendWrapper" name="legendWrapper" class="legendClass> .... </div>


Kind Regards,
Jason



Jennifer Zeisloft wrote:
> Greetings All-
> 
> I am attempting to add a scroll bar to the legend, which is built with
> the legend template widget. The legend used for the GoMMap maps is
> very similar to what I am trying to implement.
> 
> http://www.gommap.org/cwc2/cwc2.php?service=VCG&request=GetApplication&version=0.1.0&LANGUAGES=en-CA&TEMPLATES=http://dev.gommap.org/gommap/viewer.html&CONTEXTS=http://dev.gommap.org/gommap/contexts/viewer/realtime_ocean_obs.xml
> 
> I have very little experience with html, php, etc.  A friend of mine
> suggested that I ask the following (to be honest, I'm not really sure
> what the question means - but it sounds like he could help me if he
> knew the answers):
> 
>  I could make the legend scrollable by adding a div around the legend,
> and a simple css tag:
> 
> #mapLegend { width: 200px; height: 300px; overflow: scroll; }
> 
> But where do i put my opening/closeing <div id="mapLegend"></div> tags?
> 
> And where do i put the css snippet?
> 
> I am extremely grateful for all of the help that has been given in the
> past and for any help you can offer now!
> 
> Jennifer Zeisloft
> (UW-Sea Grant)
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 

-- 
_____________________________

   Jason Fournier

   DM Solutions Group Inc.
   jfournier at dmsolutions.ca
   www.dmsolutions.ca
   613.565.5056 x18



More information about the Chameleon mailing list