# Mayor CSS scaling Prob!

**URL:** <https://forum.kirupa.com/t/mayor-css-scaling-prob/172545>\
**Category:** Uncategorized\
**Created:** [December 15, 2005, 12:15pm UTC](https://forum.kirupa.com/t/mayor-css-scaling-prob/172545 "2005-12-15T12:15:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dwight](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@Dwight](https://forum.kirupa.com/u/Dwight)\
**Post date:** [December 15, 2005, 12:15pm UTC](https://forum.kirupa.com/t/mayor-css-scaling-prob/172545/1 "2005-12-15T12:15:06Z")

</div>

hi guy’s and girls ;),

i have a major problem, I’m making this site for my current boss… It’s completely in div’s and css.

Here is the problem:

I made a layout that looks like this:  
 ![](http://dwight.sockless.net/zooi/layout1.gif)

ok this is working well, but on an other page I needed the content div (the middle one) to be placed a little higer above the div on the right-top.  
So it should look like this:  
 ![](http://dwight.sockless.net/zooi/layout2.gif)

I did this as followed:

```php

#content {position:absolute; top: -31.6px;}

```

And i have this javascript to scale the div’s equaly:

```php

<script type="text/javascript"><!--//--><![CDATA[//><!--
  var d = document;

  function getHeight(){
	var box = new Array("links","content","rechts"); //list of DIV ids
	for(x=0;x<box.length;x++){ //determine the tallest div
	  h = d.getElementById(box[x]).offsetHeight;
	  for(y=0;y<box.length;y++){
		test_h = d.getElementById(box[y]).offsetHeight;
		if(h<test_h) h = test_h;
	  }  
	}
	for(x=0;x<box.length;x++) d.getElementById(box[x]).style.height = h +"px"; //set the height of all divs to the tallest
  }
  ///--><!]]></script>

```

It should work, but when i do this the left and right div becomes longer than the content div 😟

Someone who can help me out of this complete mess???
