Parent same height as child width? fiddle

HI,

Hi, How can I make the height of an element the same width as its child element?

I have an ul, and I want the <li>'s to have the same height as the <a>'s width. The reason beeing i am using transform: rotate(270deg); for vertical text.

Here is a fiddle: http://jsfiddle.net/yvmt0vug/8/

$('li').each(function(){
    $(this).css('height', $('a', this).width);   
});
1 Like

Solved it like this: http://jsfiddle.net/yvmt0vug/60/

Any better solution?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.