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: The Font shall always be ' font-family: Arial, Helvetica, sans-serif'  (Read 7923 times)

0 Members and 1 Guest are viewing this topic.

sindbad5

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Posts: 215
    • My Images - medienarchiv.com

The font-family is defined in the css in the 'body' as:     font-family: Arial, Helvetica, sans-serif;
Unfortunatey this is not what I get everwhere.

So I have to add a font-tag at many places. Is it possible to define every text of coppermine to have the same font?

I can not give you a link to that specific gallery because it is blocked to everybody outside a small circle. 

Tom 
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: The Font shall always be ' font-family: Arial, Helvetica, sans-serif'
« Reply #1 on: December 10, 2014, 08:57:45 pm »

1) Open your your_style.css and find all the: font-family: xxx  yyyy , zzz; and delete them;
Keep just the one in the body style.

2) Another way is to add !important to font in the body style.
Like this:

Code: [Select]
body {
   font-family :  Arial, Helvetica, sans-serif!important;
}

!important will make it important and overwrite other styles.

3) Another way (at the top of your styles):

* {
   font-family :  Arial, Helvetica, sans-serif;
}

* will make it important and overwrite other styles.

First method is the best way.
Is also important to have a small css file for server load and server resources so even for that is the best way.
Logged

sindbad5

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Posts: 215
    • My Images - medienarchiv.com
Re: The Font shall always be ' font-family: Arial, Helvetica, sans-serif'
« Reply #2 on: December 10, 2014, 11:33:39 pm »

Nr. 3) is cool! Thank you.

Tom
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: The Font shall always be ' font-family: Arial, Helvetica, sans-serif'
« Reply #3 on: December 10, 2014, 11:50:14 pm »

If you have inline styles ( embedded in the html or php file ) !important is the one that works.
Inline styles are more powerfull then the style from a .css file. They overwrite the styles from css.

Only important is more powerfull. !important is the most powerfull one.

example of inline styles: <div style="font-family: Arial,sans-serif; border: 1px solid #000000;">the_content_of the_div</div> or <table style="font-family: Arial,sans-serif; border: 1px solid #000000;">the_content_of_the table</table> or <td style="font-family: Arial,sans-serif; border: 1px solid #000000;">the_content_of_the td</td>
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.