Gallery wrapper mod, top margin 0px

implexant
implexant's picture

Joined: 2003-12-11
Posts: 18
Posted: Fri, 2004-08-13 07:36

Hi there,

If you go to the gallery URL (http://www.northcountrychurch.com/gallery/) you'll see a gallery. Not bad. However if you look at the top you'll see the margin is greater than 0px. How would I make it 0px like on the main site (http://www.northcountrychurch.com/index.htm)

Thanks,

-Chris
----
Give us your Gallery/webserver information to get a faster answer.
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful): http://www.northcountrychurch.com/gallery/
Gallery version: 1.4.4
Apache version: Newer... doesn't matter in this case
PHP version (don't just say PHP 4, please): Same as above
Graphics Toolkit: NetPBM, newest version on the download site
Operating system: Some form of the Linux Kernel for the webserver, Win XP Pro SP1 on my desktop
Web browser/version (if applicable): IE 6.1

 
implexant
implexant's picture

Joined: 2003-12-11
Posts: 18
Posted: Sat, 2004-08-14 04:12

Wondering if anyone can help me get rid of that space at the top of the gallery...

TIA!

-Chris

 
justchil
justchil's picture

Joined: 2003-02-07
Posts: 225
Posted: Sun, 2004-08-15 13:25

Try opening css/embedded_style.css

Change

BODY  
	{ 
          font-family: Verdana, Arial, Helvetica, sans-serif;
          font-size: 10pt; 
	}

to

BODY  
	{ 
          font-family: Verdana, Arial, Helvetica, sans-serif;
          font-size: 10pt;
          margin 0;

	}
 
justchil
justchil's picture

Joined: 2003-02-07
Posts: 225
Posted: Sun, 2004-08-15 13:26

If that moves it over to the left (which you probably don't want) try:

top-margin: 0;

 
implexant
implexant's picture

Joined: 2003-12-11
Posts: 18
Posted: Mon, 2004-08-16 08:03

thanks a bundle! I'll give it a shoot in the morning (I was just heading to bed).

Thanks again!

-Chris

 
justchil
justchil's picture

Joined: 2003-02-07
Posts: 225
Posted: Mon, 2004-08-16 21:35

No problem! Moving this to Customizing Gallery.

 
implexant
implexant's picture

Joined: 2003-12-11
Posts: 18
Posted: Tue, 2004-08-17 05:16

Actually, that didn't work...

Any ideas?

-Chris

 
Gaile

Joined: 2002-07-20
Posts: 1301
Posted: Tue, 2004-08-17 22:20

Pay closer attention to your css files. Currently in your embedded_style.css you have:

BODY  
   { 
          font-family: Verdana, Arial, Helvetica, sans-serif; 
          font-size: 10pt; 
          top-margin 0;
   }

To render correctly it should read:

BODY  
   { 
          font-family: Verdana, Arial, Helvetica, sans-serif; 
          font-size: 10pt; 
          margin-top: 0;
   }

(note you had top and margin reversed and were missing the colon that separates the tag and the value)

As well, in standalone-style.css you have this:

BODY  
	{ 
	  color: #000000
          margin 0;
	}

(You are missing the semi-colon after the color value and the colon between the margin tag and the value)

It's not necessary to have this tag in both files, that is useless duplication that just makes for more places to look for errors. Eliminate the body tag from one of these files altogether.

One last thing - the page your gallery defaults to (I'm assuming it's albums.php) - has two body tags.

<body dir="ltr">
<body topmargin=0px link="#000000" vlink="#000000">

Gaile

 
implexant
implexant's picture

Joined: 2003-12-11
Posts: 18
Posted: Tue, 2004-08-17 22:41

He told me to put in top-margin, so wasn't really my fault.

Whatever the case, I changed embedded_style.css to:

BODY  
   { 
          font-family: Verdana, Arial, Helvetica, sans-serif; 
          font-size: 10pt; 
          margin-top: 0; 
   }

And standalone_style.css to:

/* This is the default style sheet used by the Gallery when
   it is running as a standalone product.  

   If you would like to customize the styles please create 
   copy of this file called 

     "standalone_style.css" (same name without ".default")

   If that file is found in this directory it will be 
   used instead of this one.

   Some of the styles below are overriden by specific 
   album properties. These are noted.

   NOTE:  When Gallery is running standalone it still loads
   embedded_style as a baseline, but you can override those
   settings here.

   $Id: standalone_style.css.default,v 1.6 2003/09/09 12:15:20 beckettmw Exp $
*/ 

/* 
   link colors - overridden by the album 'linkcolor' property.
*/
A:link, A:visited, A:active 
	{ color: #000000; }
A:hover 
	{ color: #666666; }

/* 
   default text styles - background and colors overriden by
   album 'bgcolor', 'background', and 'textcolor' properties.
*/
TD, P 
	{ 
	  color: #000000;
	}

Notice I completely removed the BODY tags from standalone_style.css.

My gallery.header.html now has no body tags. That <body dir="ltr"> part you mentioned must have come from somewhere else cuz I sure didn't put it in. My gallery.header.html code is below:

<div align="center">
  <center>
<table cellpadding="0" style="padding:0; border-collapse: collapse; border-right-width:1; border-top-width:1; border-left-style:solid; border-left-width:1; border-right-style:solid; border-bottom-style:solid; border-bottom-width:1" bordercolor="#EBEBEB" width="740" id="AutoNumber1">
  <tr>
    <td width="731" bgcolor="#FEFDF5" height="1" style="padding-left: 7; padding-right: 0; padding-top: 12; padding-bottom: 7">
    <p align="left">
	<img border="0" src="http://www.northcountrychurch.com/name.jpg" width="529" height="53"></td>
  </tr>
  <tr>
    <td width="738" style="padding: 0; " bgcolor="#FEFDF5">
    <a href="http://www.northcountrychurch.com/index.htm">
	<img border="0" src="http://www.northcountrychurch.com/home.jpg" width="123" height="29"></a><a href="http://www.northcountrychurch.com/doctrine.htm"><img border="0" src="http://www.northcountrychurch.com/doctrine.jpg" width="123" height="29"></a><a href="http://www.northcountrychurch.com/gallery/"><img border="0" src="http://www.northcountrychurch.com/photos.jpg" width="123" height="29"></a><a href="http://www.northcountrychurch.com/webmail.htm"><img border="0" src="http://www.northcountrychurch.com/webmail.jpg" width="123" height="29"></a><a href="http://www.northcountrychurch.com/about.htm"><img border="0" src="http://www.northcountrychurch.com/about.jpg" width="123" height="29"></a><a href="http://www.northcountrychurch.com/contact.htm"><img border="0" src="http://www.northcountrychurch.com/contact.jpg" width="123" height="29"></a></td>
  </tr>
  <tr>
    <td width="718" style="padding: 10" bgcolor="#FEFDF5" height="44">
    <div align="center">
      <center>
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="98%" id="AutoNumber2" height="24">

BTW, none of either of your suggestions worked... any more ideas?

Thanks again!

-Chris

 
Gaile

Joined: 2002-07-20
Posts: 1301
Posted: Wed, 2004-08-18 00:29
implexant wrote:
He told me to put in top-margin, so wasn't really my fault.

-- I wasn't laying blame, just pointing out an error. "He" was trying to help.

implexant wrote:
That <body dir="ltr"> part you mentioned must have come from somewhere else cuz I sure didn't put it in.

-- If you look in the albums.php you'll see the body code comes from there.

implexant wrote:
BTW, none of either of your suggestions worked... any more ideas?

-- Yes, actually. Check your html code again, because there is no reason for what I told you to NOT work. I see several table errors that could be causing the problem. It's easier to troubleshoot once you know for sure the code is correct.

For example, I saw this:

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="98%" id="AutoNumber2" height="24">
<table width="100%" border="0">

You forgot the <tr> and <td> tags that should have preceeded the second table code. Double check that all your nested tables are coded correctly.

Perhaps google for css and table tutorials for the basics, and then come back here if you get stuck. I just don't have the time to comb the entire page source to find the errors.

Good luck!

Gaile

 
justchil
justchil's picture

Joined: 2003-02-07
Posts: 225
Posted: Wed, 2004-08-18 12:42

Oops.. sorry about that. Will pay more attention in the future.

Thanks Gaile

margin-top: 0px;

This works perfect with a default install of gallery.

 
Gaile

Joined: 2002-07-20
Posts: 1301
Posted: Wed, 2004-08-18 16:42

You're welcome!

Gaile

 
gk1402

Joined: 2004-08-05
Posts: 6
Posted: Wed, 2004-08-18 19:13

I'm also having the same problem, I added "margin-top: 0;" under BODY of my embedded_style.css file. I am still noticing no difference in the space at the top of the page.

Gallery: http://www.philthy.net/gallery

Trying to match: http://www.philthy.net/about.htm

 
justchil
justchil's picture

Joined: 2003-02-07
Posts: 225
Posted: Wed, 2004-08-18 19:35

Ok I might be on to something. "margin-top: 0" works fine on the default skin. However when using another skin it does not.

This led me to think.. duh each skin has it's own CSS.

So go into your skins/skinname/css and edit that embedded.css!

This should fix the both of you :)

 
Gaile

Joined: 2002-07-20
Posts: 1301
Posted: Wed, 2004-08-18 22:54

Obviously if you are using a skin you would edit the css for the skin - but I thought that was obvious (which is why I didn't bring it up).

If you are unsure of the location of the css files you should be editing, view the page source - you will find the urls listed and will know exactly what you should be looking at.

Gaile

 
gk1402

Joined: 2004-08-05
Posts: 6
Posted: Thu, 2004-08-19 00:21

Apparently you under-estimated my ignorance, thanks for the info!

 
Gaile

Joined: 2002-07-20
Posts: 1301
Posted: Thu, 2004-08-19 00:46

I guess I've been at this for so long I just *assume* a lot of times.

I was confused by Gallery's layout when I first started with it, and that was pre-skins and a lot less css to be concerned with.

I'll try to remember to state the obvious in future, since it may come in helpful to the newer folks!

Gaile

(just correcting my typos...)

 
justchil
justchil's picture

Joined: 2003-02-07
Posts: 225
Posted: Thu, 2004-08-19 01:00

Same here. I use a test gallery with default skin to test things.. totally slipped my mind :lol: