russia5 Posted May 21, 2007 Share Posted May 21, 2007 I haven't worked with HTML for a while so sorry for a newbie question. I am cutting a table with multiple rows and multiple columns. There seem to be a different amount of cells in the bottom row than in the rest of the table. After creating a standard table with Nano, can I go into the HTML and adjust the number of cells in each row the way I want them, such as two cells(columns) for the first row and three cells (columns) for the last row? If not, how can I get that effect? Quote Link to comment https://forums.phpfreaks.com/topic/52293-layout-cells/ Share on other sites More sharing options...
ToonMariner Posted May 21, 2007 Share Posted May 21, 2007 if you are using tables then colspan and rowspan are what you are after but in the long run you would probably find a div layout much mroe manageable... Quote Link to comment https://forums.phpfreaks.com/topic/52293-layout-cells/#findComment-258045 Share on other sites More sharing options...
russia5 Posted May 22, 2007 Author Share Posted May 22, 2007 Thankyou for your response. I have "boiled" down the code to having just the images, in a 5x4 matrix and below them is the pagination, still left aliegned. To my calculation, looking at the code, the pagination should be centered below the images. Can you tell me what is causing it to be left aliegned? <body topmargin="0" leftmargin="0" rightmargin="0" link="#FF6633"> <table width="100%" border="0" align="center" cellpadding="3" cellspacing="0" height="0%"> {*sid, picture1*} {foreach name=outer item=user from=$users} {if $smarty.foreach.outer.index is div by 5} <tr valign="top"> {/if} <td width="18%" align="center"><a href="gallery/ru_girl.php?id={$user.sid}"><img src="images_thumb1/{$user.picture1}" alt="Picture of {$user.full_name}" border="0"></a><br></td> {if ($smarty.foreach.outer.index + 1) is div by 5} </tr> {/if} {/foreach} <tr> <td align="center"> <script src='js/ru_pagination.js' type='text/javascript'></script> {pagination pageurl = $thepager->pageurl pageno = $thepager->pageno pagecount = $thepager->pagecount hiddenstr = $hiddenstr} </td> </tr> </table> Quote Link to comment https://forums.phpfreaks.com/topic/52293-layout-cells/#findComment-259306 Share on other sites More sharing options...
ToonMariner Posted May 23, 2007 Share Posted May 23, 2007 if you have firefox download the webdeveloper tool kit https://addons.mozilla.org/en-US/firefox/addon/60 and teh css viewer https://addons.mozilla.org/en-US/firefox/addon/2104 Use them to see what styles have been set for any element (in this case the last cell) and you may see the links floated left or someting like that. Quote Link to comment https://forums.phpfreaks.com/topic/52293-layout-cells/#findComment-259678 Share on other sites More sharing options...
ToonMariner Posted May 23, 2007 Share Posted May 23, 2007 doh - just spotted it You have just one column in that table and have set its width to 18% the bottom cell will be 18% wide and is expanding with content. either - let the cells be as wide as they need to be or add another column to the right and span the two columns with your pagination cell. Quote Link to comment https://forums.phpfreaks.com/topic/52293-layout-cells/#findComment-259681 Share on other sites More sharing options...
russia5 Posted May 25, 2007 Author Share Posted May 25, 2007 Fixed the problem, thankyou very much. Adjusted the colspan to 4 in the pagination cell. I have three spaces at the top of my template .tpl page, viewed by my "IE View Source" however, when I open the template .tpl page up in my PHP editor, or in Note Pad, they are not there. I believe they are the reasons that my page two inches below the top of the page. Does anyone know how I could be getting them? Could it be in the PHP coding? Quote Link to comment https://forums.phpfreaks.com/topic/52293-layout-cells/#findComment-261314 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.