Category Alignment Problem Category Alignment Problem
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Category Alignment Problem

Started by Becca, April 30, 2008, 11:23:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Becca

Starting a new thread as it's not okay to reply to old ones, please accept my apologies for my mistake.

I'm having a problem with the alignment of my Categories and I have RTFM-ed to the point where I've looked up every use of the words 'categories' and 'alignment'. I can't find anything in the documentation about Category alignment at all. Every theme I have installed, the categories come up wonky.

The link to the site is http://www.vanessaparadis.info/cpg14x/

Sorry for posting a screenshot before.

Any help would be much appreciated. ;D
x~Becca~x

steveeh131047

Becca,

The category alignment looks fine in Firefox - neatly lined up and left-justified.

In IE the "wonky" look you refer to is because the category table cells are centred. There's an odd couple of lines in this area when I look at the page source code:

                <td><p align="left"></p>
                  <p align="center">


It's possible they may be part of the problem.

Becca

Okay, thank you for your reply. :D This may seem like a silly question but what file must I edit to change this information?

I've tried looking through index.php which seemed like the obvious choice to me but have had no luck... ???
x~Becca~x

Joachim Müller

Edit http://www.vanessaparadis.info/cpg14x/themes/gray_satin/template.html
The table nesting there is utterly broken, so the browser will react "funny".

steveeh131047

This theme displays differently in Firefox and IE7 straight out of the box, so it's not a problem you've created.

I fixed the problem in IE7 by editing the theme's template.html file so that the <p> tag immediately before the {gallery} token is aligned left rather than center:

In other words, change:
<td><p align="left">{ADMIN_MENU}</p>
                  <p align="center"> {GALLERY}<br>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">


to:

<td><p align="left">{ADMIN_MENU}</p>
                  <p align="left"> {GALLERY}<br>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">


I don't know how "robust" this is - I haven't checked it across lots of different configurations. See if it works for you.

Like Joachims says, you might also want to check the table nesting  ....  I started, but it made my head hurt :)

Steve

steveeh131047

Despite the hurting head .......

......  there seems to be an extra </table> tag (round about line 54 in my editor) with no matching <table> tag, but removing it doesn't fix the problem. I couldn't see any obvious place a matching opening tag would go. So try the left alignment and see if it holds up.

Steve

steveeh131047

Becca,

Final thing I've found out is that IE7 renders the theme OK without any modifications if you force it into "quirks" mode. I usually do this with a dummy comment line:

<!-- cooment -->

placed on the very first line of theme.html before the DOCTYPE declaration.

Becca

Thank you so much for your help Steve, your first response has worked perfectly ;D
x~Becca~x

Joachim Müller

Your tables are still improperly nested though.

Becca

I see what you're saying but my knowledge of PHP isn't enough to be able to edit them and if it all works properly then I'm not that fussed. :-\
x~Becca~x

Joachim Müller

Not related to PHP at all - just plain HTML skills needed.

Becca

HTML's not good either I'm afraid, I use Frontpage. Will be taking a college course later this year to hopefully learn more but for the time being my knowledge is minimal.
x~Becca~x

Joachim Müller

Don't use Frontpage to edit coppermine files. Frontpage sucks if you want to hear my opinion. If you're not familiar with HTML, then use one of the themes that come with coppermine or download pre-made ones or hire someone to have one coded. It's beyond the scope of this board to teach you HTML.

steveeh131047

Becca,

Just be aware that the problems with the structure of this theme may cause it to render differently on different browsers. As Joachim says, the table structure contains several errors, and your gallery home page throws up 40 HTML validation errors - some serious, some not.

You may well find that everything works fine because modern browsers are quite "forgiving" of HTML errors; however some less common browsers, or browser versions, may cause a problem. There's not much you can do about it because it's not at all obvious what needs to be corrected - only the original author knows what he intended the table structure to be.

My advice would be to take a look at the page in as many browsers as possible. If it renders properly in Firefox, IE6 and IE7 you're covering about 90% of visitors according to the March 2008 W3C statistics - you may think that's good enough.

Good luck,
Steve

Becca

Oh no, I don't edit my Coppermine files in Frontpage, I use Notepad or edit them within my sites CPanel. Frontpage I just use for building websites but hope to move on to maybe Dreamweaver or something once I start the college course.

I agree that it's definitely beyond the boards scope to teach me HTML and certainly wouldn't ask for it, all I've learnt over the last few years with programs is through my own trial and error and I'm sure I will teach myself HTML, PHP, CSS etc. in the same manner for the time being, it's just going to take time. Only a couple of months ago I was totally at a loss with how to even begin installing Coppermine so I'm glad it's gone as well as it has this time around. ;D

I have personally got IE6 and Firefox and the gallery looks fine in them. Some of the computers at work have IE7 and Macs with Safari so I can test it out there next Tuesday. If all is fine with them then I shall leave the coding be until I know more about it.

Thank you both for your advice, it is much appreciated. ;)
x~Becca~x