lvertel Posted May 25, 2010 Share Posted May 25, 2010 hello simple question but yet impossible for me to find a solution : i have a php script, that shows me data in TABLE , so in the end, i have let's say, 10 rows in 10 tables... however, the data(text) inside of each text is of different size, and according to that, my TD is changing it's height. I did put the td height = 100, but the text that php generates, makes the TD higher. How could i make the TD height FIXED, no matter what amount of content there is in the TD?? Quote Link to comment Share on other sites More sharing options...
F1Fan Posted May 25, 2010 Share Posted May 25, 2010 You'll need to use CSS. <td style="height:100px;overflow:hidden;"> The overflow:hidden attribute will hide anything larger than the element size. Quote Link to comment Share on other sites More sharing options...
lvertel Posted May 25, 2010 Author Share Posted May 25, 2010 You'll need to use CSS. <td style="height:100px;overflow:hidden;"> The overflow:hidden attribute will hide anything larger than the element size. Hmm, i have tried it but unfortunately it didn't work Any other solution ? Quote Link to comment Share on other sites More sharing options...
F1Fan Posted May 25, 2010 Share Posted May 25, 2010 Well, I've never tried the overflow on a <td> element, so maybe that's the problem. OK, try this: put a <div> inside the <td> and add that style to the div, and put your content into the div. Quote Link to comment Share on other sites More sharing options...
lvertel Posted May 25, 2010 Author Share Posted May 25, 2010 Well, I've never tried the overflow on a <td> element, so maybe that's the problem. OK, try this: put a <div> inside the <td> and add that style to the div, and put your content into the div. great, it is working ... but only on IE FIREFOX and CHROME are still the problem. any other solution ? here is the example : http://eventy.ch/events.php?category=all u can see that CINEMA RIALTO LOCARNO is more then the 55px i've set up for height however, in IE it is showin good! Quote Link to comment Share on other sites More sharing options...
lvertel Posted May 25, 2010 Author Share Posted May 25, 2010 SOLVED! i thought i could use the overflow : hidden with SPAN as well, but i guess on firefox it works only with DIV's , while on IE8, it works on div's and span's but no td's thanks a lot for help ! Quote Link to comment Share on other sites More sharing options...
F1Fan Posted May 25, 2010 Share Posted May 25, 2010 I was just gonna say that. Glad you got it working. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.