-
Use CSS to "lock" a height of a table to 250px
Hello-
Is there a way to "lock" the height of a table to 250px using css? I have a 2 col, 1 row table that will have a an image in the left cell. The image will change, but will never be wider than 256px. The image height will be proportionate to the width. The text in the right-hand cell, however, will vary in height. My client never wants to have a gap of white space, under the image, if this text is longer than the image height. So is there a way to "lock" the height of the table, so no matter how long text is, it won't show, or gets cut off?
This is what I currently have in my code in the <head> section:
<style>
#tableht {height: 250px}
</style>
and have applied the class in my table like this <table id=tableht" width="100%" border="0" align="center">
Is there something wrong in my code or isn't this possible to do? Any help you can provide would be greatly appreciated.
Thanks much,
Kirsten
-
-
It will work, but not in IE, which expands elements to accommodate their content and totally ignores your code unless you set overflow:hidden (or :scroll). However, this is not a good idea, since it lowers the overall flexibility of your page.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks