Named anchor taking space it shouldn't Named anchor taking space it shouldn't
 

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

Named anchor taking space it shouldn't

Started by kaptainkory, July 28, 2005, 09:08:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kaptainkory

In themes.inc.php,

FIND (Line 635):

                <td align="center" valign="middle" class="navmenu" width="48px"><a name="top_display_media"></a>

REPLACE WITH:

                <td align="center" valign="middle" class="navmenu" width="48px">

All I've done is remove the named anchor.  For some reason, it is taking up space on the page and shifting the navigation buttons off alignment (tested in Firefox and IE).  I searched the rest of the CPG files and can't find that anything actually uses this named anchor anyway, so why have it?

Thanks.

donnoman

I suspect this is a problem with whatever theme you are using, and I would further suspect that your theme and/or the style.css has issues that are causing this undesired behavior.

The anchor was added for third party themes to use, even though none of the canned themes that come with coppermine use it.

You typically see this anchor used with themes that end up with a really large header (content above the actual gallery), when users are thumbing through displayimage.php either by using the filmstrip or the forward / backward buttons, a theme can be written to use that anchor and keep the top of the page page at the nav menu.

It doesn't seem to aggravate any of the canned themes, I don't see a need to remove it.

If you can point me at your gallery with it enabled and tell me where the problem is, I'll see If I can discover whats causing the spacing issue.

Joachim Müller

Just to be sure, you could do this:<td align="center" valign="middle" class="navmenu" width="48px"><a name="top_display_media" style="padding:0px;margin:0px"></a>or assign a class to the anchor tag and define the css style in your stylesheet.

kaptainkory

Capture-1.jpg shows a capture with the named anchor as it is.  I know I'm not blind...do you guys see that extra blue space above the folder icon?

Capture-2.jpg shows a capture with the named anchor removed.  I might note that I got the exact same result with the added style as suggested by GauGau.

I'm going to suggest that this style attribute be added to the named anchor in CVS.

Thanks.

kaptainkory


donnoman

Thanks for posting those images. Once I knew what to look for I confirmed that there are 4 pixels taken up on every theme, and it shoves the folder icon down just a bit.

I'm going to agree with kaptainkory's first assessment, it should just come out.

I've searched all the code, css, and html. That anchor isn't referenced by ANYTHING in the default package.

Further to actually make that function work to automatically call that anchor, those templates need to be overridden by the user supplied theme anyway.

I suggest just taking the anchor out, can I get another dev to second it?

fyi you can also get rid of it with style="display:none"
<td align="center" valign="middle" class="navmenu" width="48px"><a name="top_display_media" style="display:none"></a>

Joachim Müller

All solutions are fine for me:
<a name="top_display_media" style="padding:0px;margin:0px"></a>as well as<a name="top_display_media" style="display:none"></a>as well as removing the anchor completely. Go ahead and remove it, please.

donnoman