Forum Moderators: not2easy

Message Too Old, No Replies

CSS menu problem

Need different sizes of subpages box

         

spikedo55

12:56 pm on Jun 1, 2003 (gmt 0)

10+ Year Member



The code below limits me to a box of certian length. This works okay for short subpage titles, but not for long. Is there a way to size the box to the longest subtitle displayed so it won't look funny. Thanks.

<style>
<!--

.menuskin{
position:absolute;
width:165px;
background-color:menu;
border:2px solid black;
font:normal 12px Verdana;
line-height:18px;
z-index:100;
visibility:hidden;
}

Nick_W

1:01 pm on Jun 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How would width: auto; affect it?

Nick

spikedo55

1:03 pm on Jun 1, 2003 (gmt 0)

10+ Year Member



I have one main page with subpages with titles that are one word. I have another main page with subpages with titles that are 5 or 6 words. If I specify the width of the box to accomodate the 5 or 6 words, the box looks too big for one-word subpages. Are you following? I'm having a hard time describing it.

Nick_W

1:06 pm on Jun 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, have you tried not specifying a width? In theory the box should expand to fit it's content....?

Nick

mipapage

1:32 pm on Jun 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, have you tried not specifying a width? In theory the box should expand to fit it's content....?

That will get you some buggy behavior in Mac IE 5 I believe... It needs a width. Same with Opera 7 Win - Absolutely positioned boxes in those browsers need a width... If you plan on floating things inside it. If it's all inline you're okay. So..in this case nevermind!

[edited by: mipapage at 1:39 pm (utc) on June 1, 2003]

spikedo55

1:35 pm on Jun 1, 2003 (gmt 0)

10+ Year Member



Heck, not specifying a width worked like a charm. Doh! Thanks. Jeez that was an easy fix.