Font size , line-heigt K2

Support help forum dedicated to free and commerical templates for Joomla 3 and 2.5 version.
GK User
Wed Sep 11, 2013 5:42 pm
hey,

it's me again !!!
when i copy/paste an article(k2 item), fonts can change and size too, i would like to, i would like to change those 2 settings in k2 articles (Font size , line-height, who's too much). i tried it in k2.css i did that:

.itemIntroText ol {
font-size:11px;
font-family:Arial, Helvetica, sans-serif;
line-height: normal;
}

.itemFullText ol {
list-style:decimal;
list-style-position:inside;
font-size:9px;
font-family:Arial, Helvetica, sans-serif;
line-height:normal;

but nothing change ...
example : http://www.origamimag.com/home/index.ph ... sus-sobras
User avatar
Junior Boarder

GK User
Wed Sep 11, 2013 8:01 pm
Newer edit core css files, as You will get into a lot of trouble when You would like to update template one day.
Instead use override.css (enable it in template settings).
I have looked into source code and You have a lot of inline styling which takes over whatever You put into .css files. So firstly clear those inline stylings, and then You can try to configure global settings in .css.
User avatar
Moderator

GK User
Wed Sep 11, 2013 8:05 pm
Hi,
you don't have to edit k2.css, just use "Custom Css" : http://www.gavick.com/documentation/joo ... -template/
User avatar
Platinum Boarder

GK User
Wed Sep 11, 2013 9:54 pm
Thanks, i use joomla since 10 days, cyberek i don't really understrand what you said, i only changed that things in css files... nothing else... and i don't know what is "inline styling". i still have the original k2.css, i gonna bring it back in my ftp.

For the override solution, should i paste the same code ?
User avatar
Junior Boarder

GK User
Thu Sep 12, 2013 6:04 am
For the override solution, should i paste the same code ?

The same but changed, for example

ORIGINAL CODE

p {color:red;}

CHANGED CODE

p {color:green;font-size:12pt;}
User avatar
Platinum Boarder

GK User
Thu Sep 12, 2013 6:06 am
I use joomla since 10 days


We strongly suggest to buy a book about Joomla! :) for example Joomla Bible or Online Video Course from Lynda.com
or any other in your language.
User avatar
Platinum Boarder

GK User
Thu Sep 12, 2013 6:09 am
User avatar
Platinum Boarder

GK User
Thu Sep 12, 2013 7:26 am
About inline styling - I was hoping if You edit css files You know what You are doing ;)
To describe things fast. Joomla has WYSIWYG editor which allows You to style elements inside an article for example. It uses so called inline styling, making html elements look this way:
Code: Select all
<p style="margin: 0px; font-size: 12px; font-family: 'Lucida Grande';">La aplicación "LeftoverSwap" ubica geográficamente la oferta y la demanda de sobras, para que usted conozca el tráfico de comida a su alrededor sin importar en donde esté, esta aplicación nació a partir de datos generales de desperdicio, por ejemplo, en Estados Unidos: El 40% de los alimentos consumidos es desperdiciado, el 70% de los estadounidenses tienen sobrepeso, el 16% de las personas no cuenta con lo suficiente para comer sano y el 25% de la gente no sabe el nombre de su vecino.</p>

It is one paragraph from Your site. As You can see it sets font size, family and margins "inline" on the element, and browser uses it as priority above declarations in css files.

So firstly, You should clear all those inline styling, then we can talk about doing changes in css files.
See site source code or use firebug / chrome developer tools to see what I'm talking about ;).
User avatar
Moderator

GK User
Sun Sep 15, 2013 1:36 am
I learn alone so, yes, apparently i didn't know what i did, but i do my best... I saved the document without "inline" but i don't know where i have to paste it in ftp ? And are there a way to copy/paste an article without that WYSIWYG do his job ?
User avatar
Junior Boarder

GK User
Sun Sep 15, 2013 10:38 am
And are there a way to copy/paste an article without that WYSIWYG do his job ?


If you will use JCE editor it's have few buttons which can help you.
Also you can add & then use additional class which have different styles etc.
User avatar
Platinum Boarder

GK User
Sun Sep 15, 2013 2:59 pm
but not with k2 ?
User avatar
Junior Boarder

GK User
Sun Sep 15, 2013 7:44 pm
I don't undestand.

JCE works also in articles and k2 items.

also if you add custom css - they works both.

Please read ours Customization section tips in Wiki.
User avatar
Platinum Boarder

GK User
Sun Sep 15, 2013 8:26 pm
yes sorry, done. but still, for changing font size in override, it dont work.
User avatar
Junior Boarder

GK User
Sun Sep 15, 2013 8:43 pm
You can try to use "!important" in css style.
But I'm sure that you don't use right class right now.

Please add URL where you want to add changes .. and what kind of changes do you need.
User avatar
Platinum Boarder

GK User
Mon Sep 16, 2013 3:33 am
i want to change every k2 item >>> : http://www.origamimag.com/home/index.ph ... sus-sobras

to get paragraph (smaller and with smaller line-height) like that >>>
User avatar
Junior Boarder

GK User
Mon Sep 16, 2013 6:34 am
Use

Code: Select all
body { line-height:normal; }


for all elements on your page

or

Code: Select all
.itemBody  { line-height:normal; }


for only articles
User avatar
Platinum Boarder

GK User
Mon Sep 16, 2013 6:38 am
About font-size this same rule,
now you have font-size:14px;
so you can change for 13px or less


Code: Select all
body { line-height:normal; font-size:13px;   }

or
Code: Select all
.itemBody  { line-height:normal; font-size:13px;   }


I'm surprised that you have not done it before, though it is described on the wiki:
http://www.gavick.com/documentation/joo ... -size-etc/
User avatar
Platinum Boarder


cron