Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum
https://www.tinywebgallery.com/forum/

TWG 1.8.2: Thumbnail styles
https://www.tinywebgallery.com/forum/viewtopic.php?f=5&t=2733
Page 1 of 1

Author:  chriswue [ 2. Oct 2010, 03:05 ]
Post subject:  TWG 1.8.2: Thumbnail styles

In 1.8.2 apparently there was a center tag added around the thumbnails table cells. Unfortunately this screws with the twg_un/hoverThumbnail styles. After removing the <center> tag from index.inc.php it all looked ok. Refer to the attached images (twg_withcenter.png and twg_withoutcenter.png). I also changed the default style of the innermost td to twg_unhoverThumbnail because it seems more logical to me.
I've attached the modified index.inc.php

Cheers
Christian

Attachments:
twg_withcenter.png
twg_withcenter.png [ 50.16 KiB | Viewed 8872 times ]
twg_withoutcenter.png
twg_withoutcenter.png [ 65.4 KiB | Viewed 8872 times ]

Author:  chriswue [ 2. Oct 2010, 07:16 ]
Post subject:  Re: TWG 1.8.2: Thumbnail styles

Ok, the reason is: I changed the style for table.thumbnails to contain: height:100%; in order to scale the last table to it's container space. And as the center is now the container and not the upper td it broke that.

Author:  TinyWebGallery [ 3. Oct 2010, 12:51 ]
Post subject:  Re: TWG 1.8.2: Thumbnail styles

Hi Christian,

I don't understand the problem. Which of the 2 images is now wrong?

- Michael

Author:  chriswue [ 4. Oct 2010, 08:10 ]
Post subject:  Re: TWG 1.8.2: Thumbnail styles

The with_center is "wrong" in the sense that it does not show same sized boxes around the image. My thumbnails do not all have the same size (some are portrait, some are cropped) which gets confusing to the eye. So I wanted to add some even sized boxes around them by the center tag seems to prevent me from doing that. But maybe I'm on the wrong track here.

Author:  TinyWebGallery [ 4. Oct 2010, 08:32 ]
Post subject:  Re: TWG 1.8.2: Thumbnail styles

I think both are right. So it depends what you like...
I'll check the stuff you have sent me.

- Michael

Author:  chriswue [ 4. Oct 2010, 09:25 ]
Post subject:  Re: TWG 1.8.2: Thumbnail styles

Cool thanks. This is the style sheet I'm using:

Code:
table.thumbnails {
   margin-left: auto;
  margin-right: auto;
  vertical-align: middle;
  text-align: center;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  height:100%;
  width:100%;
   font-size: 10pt;
}

td.thumbnails {
   text-align: center;
   vertical-align: middle;
   font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10pt;
}

td.twg_unhoverThumbnail {
   text-align: center;
   vertical-align: middle;
   font-family: Verdana, Arial, Helvetica, sans-serif;
   font-size: 10pt;
   background-color:#606060;
   -moz-border-radius: 10px;
   -webkit-border-radius: 10px;
   -khtml-border-radius: 10px;
   border-radius: 10px;
}
td.twg_hoverThumbnail {
   text-align: center;
   vertical-align: middle;
   font-family: Verdana, Arial, Helvetica, sans-serif;
   font-size: 10pt;
   background-color:#808080;
   -moz-border-radius: 10px;
   -webkit-border-radius: 10px;
   -khtml-border-radius: 10px;
   border-radius: 10px;
}

td.mainnav {
   font-family:Verdana,Arial,Helvetica,sans-serif;
   font-size:10pt;
   background-color:#606060;
   padding:15px;
   width:25%;
   -moz-border-radius: 5px 20px 5px 20px;
   -webkit-border-radius: 5px 20px 5px 20px;
   -khtml-border-radius: 5px 20px 5px 20px;
   border-radius: 5px 20px 5px 20px;
}

.twg_magglas {
   position: absolute;
   top:0;
   left:0;
   z-index:45;
}

p.albumtextpright {
   margin-left:10px;
   text-align: left;
}


And the IE override:

Code:
table.thumbnails {
   margin-left: auto;
  margin-right: auto;
  vertical-align: middle;
  text-align: center;
  font-family: Verdana, Arial, Helvetica, sans-serif;
   font-size: 10pt;
  width:0%;
  height:0%;
}

td.mainnav {
   font-family:Verdana,Arial,Helvetica,sans-serif;
   font-size:10pt;
   background-color:#606060;
   width:25%;
}

.twg_magglas {
   position: absolute;
   top:0;
   left:0;

}

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/