script to resize boxes.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rsteph
    New Member
    • Oct 2006
    • 71

    #1

    script to resize boxes.

    I've got a page that has 6 boxes in a grid (like dots on a dice). In each box goes some current events type stuff. I'm trying to find a way to make it so that the boxes beside each other are always the same size.

    So if my boxes are lined up like this:
    A-B
    C-D
    E-F

    Then I want A & B to be the same size, and C & D, and E & F. But for example box A and box C would not need to be the same size. They all have the same widths, it's the heights I'm trying to match?

    Is there an easy way to do this with a script, have it look at the length of both boxes, then match them both to the longer of the two? I tried to implement something like this, but I couldn't quite get it to work. I'm not sure if I'm placing it in the wrong spot to run, or if my code is wrong. Any help would be greatly appreciated.
  • rnd me
    Recognized Expert Contributor
    • Jun 2007
    • 427

    #2
    you can set the height in CSS to a pixel value, or a percent of the parent element. using position:absolu te, and overflow:sroll, you can fit odd shaped fragments in same-sized containers.

    Comment

    • rsteph
      New Member
      • Oct 2006
      • 71

      #3
      I've got the default values set up for the boxes in my .css file. However in some cases images or text are entered that expand the boxes vertically... Making one box larger than the other. I'd like to make sure that any two side by side boxes always have the same height (are fit to the taller of the two boxes), regardless of the content inside.


      Originally posted by rnd me
      you can set the height in CSS to a pixel value, or a percent of the parent element. using position:absolu te, and overflow:sroll, you can fit odd shaped fragments in same-sized containers.

      Comment

      Working...