Kieran Menor Posted October 4, 2009 Share Posted October 4, 2009 Hi, I have this DIV with 100% width and overflow: hidden in a table cell. My problem is that it does not keep these. Instead it stretches the fork out of the page as seen here: http://misc.smwcentral.net/imageview/exhibita.html Now, if you put it in a DIV instead of a table cell, it works completely as expected: http://misc.smwcentral.net/imageview/exhibitb.html How do I make it behave? Quote Link to comment Share on other sites More sharing options...
CarbonCopy Posted October 4, 2009 Share Posted October 4, 2009 First of all, do not use tables. Second of all, use valid attributes (Style not width). Third, as is, just set the div's width to 500px. Quote Link to comment Share on other sites More sharing options...
Kieran Menor Posted October 4, 2009 Author Share Posted October 4, 2009 Don't tell me what not to use. Tables are perfectly fine in the right context. Also, width is a prefectly valid attribute in HTML 4. Lastly, this is merely an example of how it behaves in a table. I do, in fact, need the 100% width, so setting a static width on the div will not solve my problem. Quote Link to comment Share on other sites More sharing options...
CarbonCopy Posted October 4, 2009 Share Posted October 4, 2009 My apologies. All I've found so far that worked is <table width="500" style="overflow:hidden;display:block;"> but I am still investigating it. Quote Link to comment Share on other sites More sharing options...
CarbonCopy Posted October 4, 2009 Share Posted October 4, 2009 I spoke too soon! <table width="500" style="table-layout: fixed;"> Is that good enough for you? Not sure if it does what you need it to Quote Link to comment Share on other sites More sharing options...
Kieran Menor Posted October 4, 2009 Author Share Posted October 4, 2009 It seems to work like a charm. Thanks a lot. Quote Link to comment Share on other sites More sharing options...
CarbonCopy Posted October 4, 2009 Share Posted October 4, 2009 No problem, glad it works Quote Link to comment Share on other sites More sharing options...
haku Posted October 5, 2009 Share Posted October 5, 2009 Don't tell me what not to use. Tables are perfectly fine in the right context. You are correct, except that the context in which you are using them doesn't appear to be right - images are not tabular data. 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.