I'm working on a generic dashboard renderer, and it's supposed to be 100% configuration powered - so if a customer wants to define a "screen" showing two dashboards at once, it should be perfectly possible.

In that case, the app must be configured with something like this:

zones: {
    type: zone_map,
    contents: {
      leftzone: {
        x: 0,
        y: 0,
        width: 75%,
        height: 50%
      },
      rightzone: {
        placement: relative,
        right_of: left,
        width: 20%
      }
    }
  }

And then

 screen1: {
   type: screen,
   cast: [dashboard1,dashboard2],
   mapping: {dashboard1: leftzone, dashboard2: rightzone}
}

Or something like this :)

My question is: given a definition for a div like leftzone in the "zones" map, how can I output enough CSS to guarantee rightzone is outputted to the right of it?

Hope I've been clear enough. "Raw" CSS on the configuration for the app is not acceptable.

Thanks for your time!

1 answer

0
points
#rightzone{
     float:right;
}
#leftzone{
    float:left;
}
Answered almost 8 years ago by Chris Sobolewski