Jump to content

Layout cells


russia5

Recommended Posts

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?

Link to comment
Share on other sites

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>



 

 

 

 

 

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.