Stage 2: Making out image to be in the center!

Makc666
Makc666's picture

Joined: 2003-12-26
Posts: 78
Posted: Mon, 2005-03-07 12:11

================================================

First of all you can make these changes only if you made changes from:
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=27090

After all this changes a single image (screenshot #1) will look like on screenshot #2.
We will make it more pritty. :)

Some words before we start. There is block, if you made changes on the link above:

#gsAlbumContents {
        float: left;
        width: 100%;
        padding: 0;
  background-color: #eee;    
}

We can put one more line in it: "text-align: center;" and work from this line forward.
But we will make it in another way.
We will change each necessary block individually!

================================================
Lets start.
We will work with: /themes/veloria/styles/theme.css

-----[ OPEN ]------------------------------------------------
/themes/veloria/styles/theme.css

-----[ FIND ]------------------------------------------------
.gsSingleImage {
	margin: 16px;
}

-----[ REPLACE WITH ]------------------------------------------ 
.gsSingleImage {
	text-align: center;
	margin: 16px;
}

-----[ FIND ]------------------------------------------------
.gbTopFlag, .gbBottomFlag {
	background-color: #ddd;
	margin: 0;
	padding: 0;
}

-----[ REPLACE WITH ]------------------------------------------ 
.gbTopFlag, .gbBottomFlag {
	text-align: center;
	background-color: #ddd;
	margin: 0;
	padding: 0;
}

-----[ FIND ]------------------------------------------------
.giInfo {
	display: block;
	font-size: 0.9em;
	color: #888;
	margin: 0;
	padding: 2px;
	list-style: none;
}

-----[ REPLACE WITH ]------------------------------------------ 
.giInfo {
	text-align: left;
	display: block;
	font-size: 0.9em;
	color: #888;
	margin: 0;
	padding: 2px;
	list-style: none;
}

================================================
Q: What we made?

A: So:
1. In first change we put our image in the center.
2. In second one we put line with title and information in the center.
3. As in second chage the INFO text (Date: Size: Full size:)
was also set to the center, in third change we return this text to normal state
by adding line "text-align: left;"

On the second screenshot you will see what we get after this little changes.
================================================

AttachmentSize
g2-stage-2-center-01-before.png40.83 KB
 
FlamingFoo

Joined: 2005-03-09
Posts: 14
Posted: Thu, 2005-03-10 21:32
#gsAlbumContents { 
        float: left; /* not needed */
        width: 100%; /* not needed */
        padding: 0; 
  background-color: #eee;    
}

I think your layout should work fine with those two lines removed, as albumContents is a block level element and thus will take full available width if no width declaration is given.

 
Makc666
Makc666's picture

Joined: 2003-12-26
Posts: 78
Posted: Thu, 2005-03-10 22:01
FlamingFoo wrote:
#gsAlbumContents { 
        float: left; /* not needed */
        width: 100%; /* not needed */
        padding: 0; 
  background-color: #eee;    
}

I think your layout should work fine with those two lines removed, as albumContents is a block level element and thus will take full available width if no width declaration is given.

You are not right because G2 first tooks ALL values from
/gallery2/templates/layout.css.php
Then it takes values from (for example):
/gallery2/themes/veloria/styles/theme.css

If G2 find values in:
/gallery2/themes/veloria/styles/theme.css
then G2 overwrite default values from:
/gallery2/templates/layout.css.php

If G2 doesn't find values in:
/gallery2/themes/veloria/styles/theme.css
then G2 takes default values from:
/gallery2/templates/layout.css.php

So in:
/gallery2/themes/veloria/styles/theme.css
code is:

#gsAlbumContents, #gsAdminContents, #gsOtherContents {
    float: left;
    width: 78%;
}

If I don't set code:

#gsAlbumContents { 
        float: left; /* not needed */
        width: 100%; /* not needed */
        padding: 0; 
  background-color: #eee;    
}

in /gallery2/themes/veloria/styles/theme.css
then G2 will overwrite it with
float: left;
width: 78%;

That it.

 
Makc666
Makc666's picture

Joined: 2003-12-26
Posts: 78
Posted: Wed, 2005-04-13 11:46

Can some one of moderatores help to make the same in G2 Beta 2
like

-----[ OPEN ]------------------------------------------------ 
/themes/veloria/styles/theme.css 

-----[ FIND ]------------------------------------------------ 
.gsSingleImage { 
   margin: 16px; 
} 

-----[ REPLACE WITH ]------------------------------------------ 
.gsSingleImage { 
   text-align: center; 
   margin: 16px; 
} 

I can't find any value for single image in veloria theme in G2 Beta 2.
And I want to move "normal" image to the center.
Help with advise please. :roll: