forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: sindbad5 on December 10, 2014, 08:46:31 pm

Title: The Font shall always be ' font-family: Arial, Helvetica, sans-serif'
Post by: sindbad5 on December 10, 2014, 08:46:31 pm
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 
Title: Re: The Font shall always be ' font-family: Arial, Helvetica, sans-serif'
Post by: allvip 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.
Title: Re: The Font shall always be ' font-family: Arial, Helvetica, sans-serif'
Post by: sindbad5 on December 10, 2014, 11:33:39 pm
Nr. 3) is cool! Thank you.

Tom
Title: Re: The Font shall always be ' font-family: Arial, Helvetica, sans-serif'
Post by: allvip 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>