# How to control the vertical height of boxes

I would like to create boxes where I can control the height of the boxes. Right now I have used the command.

``````\colorbox{calcclr}\makebox[\textwidth-2\fboxsep][l]{#1}}}
``````

This gives me a box that stretches vertically how I want. Depending on the content of the box however the box vertical size is adjusted accordingly. Fractions for example will automatically make the box vertical height larger (as it needs to contain a fraction), while linear equations makes the height smaller

How can I solve this problem?

-
Welcome to TeX.sx! You code snippet is wrong, you miss a `{`. Usually it is good if you add a full compilable, but minimal working example (MWE) that illustrates your problem. –  Martin Scharrer May 22 '12 at 11:09
Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. –  Werner May 23 '12 at 23:14
Actually your miss two `{`... Besides from that you could obviously have formulated the code snippet better, the question itself was quite good. –  StrawberryFieldsForever May 3 at 12:03
You can use the `{minipage}[<vertical alignment>][<height>]{<width>}` environment to specify the width of the content. Here `<vertical alignment>` should be `t`op, `b`ottom or `c`entered. Just give a constant `<height>` for all your framed equations.
If you instead want to set the height or depth you can use `\raisebox{0p}[<height>][<depth>]{...}`