TFT2012 Posted June 27, 2012 Share Posted June 27, 2012 I have an issue with tables inside fieldset recently. Here is my code: <div style='width:1200px'> <fieldset><legend>sample</legend> <table id='A'> <tr><td>111</td><td>122</td><td>131</td><td>811</td></tr> </table> <table id='B'> <tr><td>111</td><td>122</td><td>131</td><td>811</td></tr> </table> <table id='C'> <tr><td>111</td><td>122</td><td>131</td><td>811</td></tr> </table> </fieldset> </div> -- The table ID in code only for distinguish the tables. I setup the outside DIV width to 1200px. I didn't setup the width to tables because the table A, B, C may have different width of cells. The issue is, table B will starts in a new line only if table A is long enough. Like the width of table A is about approx 1000px and table B is about 600px, then table B will starts from a new line. Otherwise, the table A and B will be parallel. Adding <br/> between tables dosen't work. Is there any way that can make table starts from a new line regardless the width of table? Thanks a lot. Quote Link to comment https://forums.phpfreaks.com/topic/264887-the-tables-couldnt-display-vertically-inside-the-fieldset/ Share on other sites More sharing options...
Jessica Posted June 27, 2012 Share Posted June 27, 2012 Try adding a style that makes the tables display as block elements. table{ display: block; } Quote Link to comment https://forums.phpfreaks.com/topic/264887-the-tables-couldnt-display-vertically-inside-the-fieldset/#findComment-1357491 Share on other sites More sharing options...
TFT2012 Posted June 27, 2012 Author Share Posted June 27, 2012 I just tried, but it didn't work. Try adding a style that makes the tables display as block elements. table{ display: block; } Quote Link to comment https://forums.phpfreaks.com/topic/264887-the-tables-couldnt-display-vertically-inside-the-fieldset/#findComment-1357532 Share on other sites More sharing options...
Jessica Posted June 27, 2012 Share Posted June 27, 2012 Do you have any other style on the page? I think tables are block by default so you may have something else messing them up, Quote Link to comment https://forums.phpfreaks.com/topic/264887-the-tables-couldnt-display-vertically-inside-the-fieldset/#findComment-1357533 Share on other sites More sharing options...
TFT2012 Posted June 27, 2012 Author Share Posted June 27, 2012 For this DIV, the stylesheet only defines margin, padding, font and width. The fieldset has margin and padding only. The table has only align and valign. There are no other style settings. This inner HTML of this DIV is generated by AJax, but it shouldn't be a problem, is it? Do you have any other style on the page? I think tables are block by default so you may have something else messing them up, Quote Link to comment https://forums.phpfreaks.com/topic/264887-the-tables-couldnt-display-vertically-inside-the-fieldset/#findComment-1357546 Share on other sites More sharing options...
TFT2012 Posted June 27, 2012 Author Share Posted June 27, 2012 Hmmm.. how to attach the picture here? I made a screenshot for the issue. I saw the attachment when I reply, click the "browser", choose the picture (137KB), then there is no button like "submit" or "attach" for me to upload. If I click "POST', it is going to say "The attachment is not saved...." Quote Link to comment https://forums.phpfreaks.com/topic/264887-the-tables-couldnt-display-vertically-inside-the-fieldset/#findComment-1357555 Share on other sites More sharing options...
deathadder Posted June 30, 2012 Share Posted June 30, 2012 you should supply a image, also instead of closing the table tag everytime you end the <tr> tag do this for example <table> <tr> <td></td> </tr> <tr> <td></td> </tr> </table> instead of closing the tags, i doubt it will do anything but its worth a try, try using multiple <br />'s might work Quote Link to comment https://forums.phpfreaks.com/topic/264887-the-tables-couldnt-display-vertically-inside-the-fieldset/#findComment-1358088 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.