I have a UL where the LIs are boxes. I want the boxes to all be the same size, but sometimes the boxes are one line, and other times they're two. how do i add an extra empty line in the LI if the content is only one line? I'm assuming this will be some sort of javascript?
+1
A:
Without seeing any of your HTML markup, you could use CSS height
or min-height
properties. The latter will only work in the latest browsers, e.g. not IE6.
Jason McCreary
2010-07-26 17:08:41
in IE6 you cadd the CSS property '_height' - it's a hack that works like min-height in other browsers just for IE6!
gillyb
2010-07-26 17:12:33
@gillyb I don't advocate hacks. You should look into IE6 conditional comments. Otherwise, your answer was the same as mine.
Jason McCreary
2010-07-26 19:28:38
A:
You should just give them all a certain 'height' or 'min-height' attribute instead of trying to fix a height that is automatically rendered to them.
Try posting some of your html so we can help you more though...
gillyb
2010-07-26 17:11:46
hi gillyb- thanks for your answer. It works in FF. What do you mean by _height for ie6, though? would i put min_height:2em;for the ie6-specific CSS?
Eric
2010-07-26 17:23:01
great, i got it to work; it's just _height. only thing is, em doesn't work, only px. why is that?
Eric
2010-07-26 17:38:05
no, you would just write _height:2em; for ie6.IE6 I think is the only browser that considers CSS class names that start with an underscore ('_'), so this works only in IE6, and it works the same as min-height property in other browsers.
gillyb
2010-07-26 17:39:48