Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: changing font of gallery name and description  (Read 3300 times)

0 Members and 1 Guest are viewing this topic.

alanpalan

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 60
changing font of gallery name and description
« on: November 12, 2007, 04:48:27 pm »

I want to change the font of gallery name and description (in header of Coppermine). Whad do you recommend? Do I have to change it in template.html or is there some more appropriate way how to do it?
« Last Edit: November 13, 2007, 07:04:15 pm by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: changing font of gallery name and description
« Reply #1 on: November 12, 2007, 06:02:34 pm »

template.html is the place to change if you want to assign a different CSS class.
style.css is the file where you should add your actual format.

Example:

if you currently have this in your template.html file:
Code: [Select]
              <h1>{GAL_NAME}</h1>
              <h3>{GAL_DESCRIPTION}</h3>
and want to control/change the font size, change it to
Code: [Select]
              <h1 class="gallery_name">{GAL_NAME}</h1>
              <h3 class="gallery_description">{GAL_DESCRIPTION}</h3>
Then modify style.css by adding this
Code: [Select]
.gallery_name {
    font-size:16px;
}
.gallery_description {
    font-size:14px;
}
Alternatively, you can assign the style inline as well by replacing
Code: [Select]
              <h1>{GAL_NAME}</h1>
              <h3>{GAL_DESCRIPTION}</h3>
with
Code: [Select]
              <h1 style="font-size:16px">{GAL_NAME}</h1>
              <h3 style="font-size:14px">{GAL_DESCRIPTION}</h3>
Got the idea?
Logged

alanpalan

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 60
Re: changing font of gallery name and description
« Reply #2 on: November 13, 2007, 05:13:56 pm »

Yes, I got it. Thanks. But first of all I want to change the font to "Comic Sand MS" (or something like that). So, I should attach to the css file this?

.gallery_name {
    font-family: Comic Sand MS ;
}
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: changing font of gallery name and description
« Reply #3 on: November 13, 2007, 07:03:12 pm »

You can only use that font if it is installed on the the client computer. Since you can't say that for sure, it's not a bright idea to use a proprietary Microsoft-font. If you want my personal opinion: don't use Comic Sans at all: it's a lame effort to make your site look different, and there's no good fallback. Anyway, if you insist to use that font, you have to make sure to provide a safe fallback and to put the name of that particular font into quotes. Subsequently, the line of code you posted above should read
Code: [Select]
.gallery_name {
    font-family: 'Comic Sans MS', Arial, Helvetica, sans-serif;
}
The browser will then render the corresponding output using that font if it is installed on the client and fall back to Arial. If Arial isn't available, it will use Helvetica. If Helvetica isn't available, it will use any sans-serif font available on the client's operating system (specified in the browser's preferences).
However, this isn't related to Coppermine at all, but plain CSS knowledge. This board is not dedicated to teaching users CSS - you better read this up somewhere else. In fact, I can only recommend to spend some time on learning CSS. If you don't, you'll end up with a page that will look fine on your client only and will look like sh** on everybody else's PC.
Logged

alanpalan

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 60
Re: changing font of gallery name and description
« Reply #4 on: November 13, 2007, 09:26:41 pm »

Ok, maybe it would be better to put there graphic logo (with another font).
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: changing font of gallery name and description
« Reply #5 on: November 14, 2007, 07:48:47 am »

In terms of being fail-safe: yes. In terms of search-engine-friendliness, accessibility and bandwidth-use: no. If you ask me: a gallery is already full of images (that's expected behaviour) - cluttering the theme with even more images is not a bright idea. Anyway, issue solved, case closed. Usually, people say "thank you" after getting a detailed answer...
Logged

alanpalan

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 60
Re: changing font of gallery name and description
« Reply #6 on: November 14, 2007, 02:53:48 pm »

Of course, thanks :)
Logged

alanpalan

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 60
Re: changing font of gallery name and description
« Reply #7 on: November 14, 2007, 03:19:14 pm »

(When you mark this threat as "solved", I thought you would not come back here :)
Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 19 queries.