views:

33

answers:

2

Hi , i m usin a vertical deopdown menu for my website .i had set its top and left attrtibutes in pixel to fix its position according to its parent elements postion.but when i reduce the size of the browser the dropdown menu remains at the same positon where it was when the browser was at its full size.can u helpme with that. if posible plz mail me at [email protected] I m not having the source code right now.

A: 

You won't get an answer with this info, we can't help you like this.

Please give more information on the nature of the problem and show us some of the css/html.

Pim Jager
A: 

I'm assuming your vertical dropdown is positioned absolutely? If this is the case, it sounds like its parent element doesn't have position:relative set:

<div class="parent">
  <div class="dropdown">
    ...
  </div>
</div>

CSS:

.parent {
  position: relative;
}

.dropdown {
  position: absolute;

  /* These values will now be relative to the parent's position */
  left: 0;
  top: 0; 
}
Pat
ok sir i;ll try with that code...thanks