0

I'm using gridstylesheets.org to mess with Constraint CSS. My html is this:

<div class="box side-by-side">
  <div class="space"></div>
  <div class="space"></div>
  <div class="space"></div>
</div>

I would like each .space to be the height of the .box and to have evenly sized widths. In this case, the .box width divided by 3.

So far I have this:

.side-by-side .space {
  left: >= ::parent[left];
  top: >= ::parent[top];
  width: == 200;
  height: == 100;
}
.side-by-side {
  @h .space in([.side-by-side]);
}

It floats the .spaces inside the parent but I'm not sure how to set the width. I would like to do something like this:

width: == ::parent[width] / ::parent[num-children];
Justin808
  • 20,859
  • 46
  • 160
  • 265

1 Answers1

0

I believe this will work:

(.space)[width] == ((.box)[width]) / 3;
Clay Lenhart
  • 1,597
  • 15
  • 17