Archive for Before posting please check the "stickies" in the support forums.
Please ask questions in real English and not "txt". You will get a better response.
Please do not ask support questions via PMs.
  Forum Index -> Web page/template Editing

Problems with <td> alignment


Enter your myff forum url here, if the issue is on a particular part of the forum, then give a link to where the problem actually is. Do not enter your own domain name it must be the actual myff link :

If you are asking a template related question, what is the name of the template:
myfs_academyofcombat3 and myfs_academyofcombat2 (same problem on both)

Please indicate keywords you have searched on:
align column, align td

Now ask your question in clear English without "txt" speak>>>>
So I am having a problem aligning the "report post" button that I put in.  I wanted it to be on the bottom right of each post.  I couldn't figure out how to input it in the same row as the profile/email/www buttons and have it aligned to the opposite side, which is what I wanted to do, so I simply created a new column and changed the colspan of everything to fit it in.  However now the button is kind of floating on the right-ish side of the post, but not all the way to the right (see screenshot), and seems to be stuck to the left side of the column.  I tried putting align="right" on the button, on the td, even on the tr, but to no avail (I am new to this teaching myself so I have to kind of experiment around to figure out what I am doing hehe).  I also tried to put a definite width on the column (width="100") but the column just ignores it and continues being however wide it wants to.  I would like some help doing either of those things; either aligning the button to the right or shortening the width of the column until the image all the way on the right.

Oh and also I looked at the code for other parts of the page such as the quote/edit/delete buttons and the Back to Top link trying to figure out how they were aligned to where they are.  I have tried imitating them and putting in things that were in those codes but nothing works so far.

The only thing I have been able to do to get it to go all the way to the right is to add a ton of &nbsp; before the button which I know is a terrible fix and probably clogs up the server so I know it is only a temporary solution until I figure out what is going on.


<td align="right">button</td>

I think?

I don't use tables much anymore, shout back if it doesn't work

Yeah I have tried that already, no success.  Here is the code below, there is probably a lot of unnecessary junk in here as I have been adding bits of code everywhere trying to fix it.

         <tr align="right">
            <td width="100" align="right" valign="middle" nowrap="nowrap"><span class="nav">
<a class="gensmall" href="javascript:void(0)" onclick="'/action.php?action=REPORT&popup=1&p={postrow.POST_ID}','report','height = 300, width = 300')"><img src="/templates/myfs_academyofcombat2/images/lang_english/icon_reportpost.gif" border="0"></a></span></td></tr>
myff admin

at a guess


<tr><td width="100%" align="right">...<//td></tr>


Nope, didn't work.  That double slash was a mistake right, it's not important?

Odd thing I noticed, when I refresh the page, while it is reloading it looks fine, the column is just big enough to fit the button, so it appears all the way to the right, then when the page finishes loading the column expands and the button jumps over to where it is in the screenshot.
myff admin

I just looked in firefox3.6 and it is right aligned.

I think you are probably looking with the default template which is still using the &nbsp trick to properly align it (bad I know).  Right now I'm just editing my old template myfs_academyofcombat3 until I can fix it, then will apply the actual fix to the main template.

I would say you need to look at the stylesheet and see if classes "nav" and "gensmall" have any alignment on them. Padding and margins can also have an effect on the positioning of an element, so look for that too.

Thank you for the advice but that did not work either...

I did manage to find out what was wrong and fix it though.  I think you guys would have seen it if I had given you a bigger chunk of coding, sorry my fault on that.  The cell that the button was in was not actually inside the big table directly, it was a cell inside a small table inside the big table.  Hopefully you know what I mean lol... It was a table inside a table so I needed to align the small table itself, not just a cell inside it.

Thanks for all your guys' help anyway. Forum Index -> Web page/template Editing
Page 1 of 1
Create your own free forum | Buy a domain to use with your forum