PDA

View Full Version : Auto-Size Menu Item Height?


LonBoy
21.05.2001, 13:17
Has anyone came up with a way to 'auto-size' (ie wrap) text in the menu's? I am able to set the height for each item manually but would be really great for the script to do this automatically. I changed the overflow setting in cm_makeStyle() from clip to visible but did not solve.
Best example would be a menu item where width is set to 20% of available screen resolution and text label on an item is say, 20 characters. Looks just fine in higher resolution, but as screen size shrinks, text will 'wrap' to a second line and the extra or wrapped text will get clipped. Looking for a way around this without hand coding each item with a set height or having a bunch of extra space below an item to accomodate lower resolution or browser window sizes.
Thanks in advance for any advice! Keep up the great work!

bratta
22.05.2001, 12:39
I see your point LonBoy. Maybe I'll add something like that to the next version. I have stayed away from it so far becouse getting the height of dynamiccly created elements in all browsers tends to be a little unstable at times.

-Thomas Brattli-
http://www.bratta.com/
http://www.dhtmlcentral.com/

LonBoy
22.05.2001, 14:49
Thanks for responding! I appeciate the complexity of this issue. I am hoping that detecting the initial size of the <div> element after creation may lead to a solution. I had hoped that setting the CSS attribute for overflow to visible would solve, but as we are all painfully aware, every browsers implementation is different. You have created a fantastic script and if I find a solution I will be sure to share it. Again much thanks for your work!

bratta
22.05.2001, 15:32
The script does a lot of manipulation of the layers so I am afraid that changing any of the css wont do it. But for sure this is possible, I just can't priorotize it right now. Maybe sometime soon though.

Glad you like the script :)

Later.

-Thomas Brattli-
http://www.bratta.com/
http://www.dhtmlcentral.com/