gizmorattler Posted October 5, 2010 Share Posted October 5, 2010 I don't get why these columns won't stay side by side vertically. I've tried playing around with the css. Please help. <body> <?php include_once "header_template.php"; ?> <div id="site_body" align="center"> <table width="735" border="0" height="1"> <tr> <td> </td> </tr> </table> <table width="749" height="150" border="1" align="center" bordercolor="" class="wrap"> <tr> <td width="240" height="100%" align="left" valign="top"><div id="spry_box" align="center"><?php include_once "spry_Collapsable_panal.php"; ?></div></td> <td width="255" align="center" valign="top"><div id="join_form_box" align="center"><?php include_once "join_form.php"; ?></div></td> <td width="240" align="right" valign="top"><div id="right_AD_box" align="center"><?php include_once "right_AD_template.php"; ?></div></td> </tr> </table> </div> <?php include_once "footer_template.php"; ?> </body> Quote Link to comment Share on other sites More sharing options...
GalaxyTramp Posted October 5, 2010 Share Posted October 5, 2010 Hi Why are you using tables at all when you can, and should be, using just CSS for your layout? GT Quote Link to comment Share on other sites More sharing options...
iridys Posted October 5, 2010 Share Posted October 5, 2010 Why are you using tables at all when you can, and should be, using just CSS for your layout? Because sometimes, CSS is more trouble than it's worth. Sometimes you just need a table. Though, I'm not sure that's the case in this situation. Err, by "side by side vertically" you mean one on top of the other? Well I'll assume so... Seems there's a lot of redundant tags there. Anyway, I suggest you remove all the widths. For webdesign, in general, absolute widths or heights are a big no-no. If you must set a width, do it on the outer-most DIV. Also, it will be less of a headache if you decide now whether to code all the layout in the CSS or the HTML. In other words, if you want to set width/height, do it in the CSS or HTML only, but not both. Otherwise the clashing will result in major headaches. Quote Link to comment Share on other sites More sharing options...
GalaxyTramp Posted October 5, 2010 Share Posted October 5, 2010 I strongly disagree with iridy saying CSS is more trouble than its worth. Get it right and it works cross browser, is easy to update, gives absolute positioning the list goes on. The advantages are immense compared to tables. I am not sure what you mean by "side by side vertically" either?? If something is side by side then surely that must be horizontally? Without seeing what your include files contain it is difficult to offer an opinion on this because they could be breaking the table structure. GT 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.