I am using this code to show latest user comments on my website – Some comments are 1 liners and others are longer.
http://jqueryfordesigners.com/demo/simple-spy.html
If you look at the source code – the height is set to 90px and overflow is set to hidden
#sidebar li {
height: 90px;
overflow: hidden;
}
Now I want to show the entire text here – so I changed the overflow attribute to visible.
Since the height is set to 90px, if any comment is longer, its overrides the previous entry – meaning you can see the last line of this long entry on top of the previous entry.
This happens only in IE browser – in chrome – it automatically adjust the height.
One option I have is to increase the height from 90px to say 130px – but thats not a good solution – because the entry that has only 1 line will have so much blank space and entries that are even longer might still go over the 130px height limit.
I cant change that height attribute to auto or something cos that is being used in the script for creating the scrolling effect.
Is there a way to fix this in IE
Thanks
Have you tried to set your css to min-height:90px ? like this it will have 90px if one line of text is required, but if more are required, it will grow fluid!
And remove that over-flow hidden!
EDITED — WORKING EXAMPLE:
Ok, Here’s the complete code properly tested (and just like I’ve tool you, just setting min-height, it works fine 🙂 (sorry for the delay, but I’ve been extremely busy… :/
I’ve not formated the style for good visual appearance, but as you can see, some items are bigger that others.. 🙂
Just copy the code to .html file and view it!