Width for sub sub ul always returns 0

Hi,

I’m trying to figure out the width of all the ul element inside a li, which works fine for the subnav. But the ul for the subsub nav always returns a width of 0, which is incorrect.

You can see an example on this page. The second tab is the one that has a sub navigation.
http://tijmensmit.com/dev/jquery/navtest.html

I use a simple line like this to get the with of the ul element


var e_size = $("#testnav ul").width();
//shows 95 with alert

var e_size = $("#testnav ul ul").width();
//shows 0 with alert

Why could it be that the subsub nav ul always returns 0, while the sub ul does show the correct width? Its not like it doesn’t contain any content.

Thanks :slight_smile:

Just guessing - Could it be because display = None?
Try setting to block initially and see if you get width.