div trick

Out of context: Reply #11

  • Started
  • Last post
  • 16 Responses
  • kpl0

    I'm guessing you mean you want a div to be exactly the size of the widest div or the window, whichever is bigger.

    I'd say try putting a spacer image within the div that would equal the longest div you have on the page, and set the div width to 100%. this will work only on certain browsers: safari, yes, mozilla, no....

    Another method is to use fixed positioning... but that's guaranteed not to work for msie.

    I'd just say f' it and do absolute values throughout.

View thread