-
AuthorPosts
-
darengr Friend
darengr
- Join date:
- January 2012
- Posts:
- 108
- Downloads:
- 112
- Uploads:
- 30
- Thanks:
- 4
- Thanked:
- 1 times in 1 posts
January 12, 2016 at 6:51 pm #845887Hi, I need to have smaller article titles in blog layout, so I thought of just styling them with h3, and not h2 which is the default.
in the attached image, I changed the code within my browser (selected gray line), and it looks as I want it, with h3 style applied, in the left square shown.Where should I put this change to make it permanent?
regards
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 12, 2016 at 6:57 pm #845903Hi
Could u provide the site url and let me know on which part of template you want to change the heading tag .
All the heading are defined in the /html/com_content / php files . You can provide me some more requested details so i can give u exact path .darengr Frienddarengr
- Join date:
- January 2012
- Posts:
- 108
- Downloads:
- 112
- Uploads:
- 30
- Thanks:
- 4
- Thanked:
- 1 times in 1 posts
January 12, 2016 at 7:06 pm #845921This reply has been marked as private.Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 12, 2016 at 7:18 pm #845949Hi
via custom.css file you change the font size but to change heading tag also you need to modify it from php file .
The link u shared seems to be blog layout for this
Go to /templates/ja_mono/html/com_content/category/blog_item.php
Find<?php echo JLayoutHelper::render('joomla.content.item_title', array('item' => $this->item, 'params' => $params, 'title-tag'=>'h2')); ?>
change H2 to h3 from above code .
Hope it helps.darengr Frienddarengr
- Join date:
- January 2012
- Posts:
- 108
- Downloads:
- 112
- Uploads:
- 30
- Thanks:
- 4
- Thanked:
- 1 times in 1 posts
January 12, 2016 at 7:32 pm #845983thank you very much,
can I change the font size in custom.css only for the article title within the blog layout, without modifying other parts of the site?Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 12, 2016 at 9:26 pm #846066Yes use this code in custom.css
for the shared page menu`
.itemid-143 h2{font-size:30px!important;}
replace it with h3 if u changed it from php file .
darengr Frienddarengr
- Join date:
- January 2012
- Posts:
- 108
- Downloads:
- 112
- Uploads:
- 30
- Thanks:
- 4
- Thanked:
- 1 times in 1 posts
January 12, 2016 at 10:01 pm #846083I will try tomorrow,
time to go to bed now, on my side of the world 😉
regards and many thanks!
darengrdarengr Frienddarengr
- Join date:
- January 2012
- Posts:
- 108
- Downloads:
- 112
- Uploads:
- 30
- Thanks:
- 4
- Thanked:
- 1 times in 1 posts
January 13, 2016 at 4:35 pm #846842thanks Pankaj,
this worked fine within custom.css,
I noticed that within the menu item, there is a field called Page Class.
Do you think I can use this to specify the h2 font size for this page?I tried it, but I am not sure of the syntax of ".itemid-143 h2{font-size:30px!important;}",
I mean with period at the front or not,
with an extra space or not,
with .itemid-143 or not?Do you know if this will work, so it easier to manage within the page from joomla directly?
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 13, 2016 at 4:46 pm #846873Hi
the code is for the custom.css
Add code in custom.css or use page class and then define the style code in custom.css .
https://docs.joomla.org/Page_Class_Suffixdarengr Frienddarengr
- Join date:
- January 2012
- Posts:
- 108
- Downloads:
- 112
- Uploads:
- 30
- Thanks:
- 4
- Thanked:
- 1 times in 1 posts
January 13, 2016 at 5:08 pm #846889so I can learn how to use the page class together with style code in custom.css, I put
.h2with18px.h2{font-size:18px!important;}
and
h2with18px
with a space in front in page class field, but I do not know the exact syntax, can you please correct me?
within custom.css, do I specify .h2with18px.h2{font-size:18px!important;} or .h2with18px {font-size:18px!important;} or something else?
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 13, 2016 at 5:22 pm #846898Hi
Page class work like this
add this > custom_heading
in page class
now define this rule in custom.css.custom_heading h2 {font-size:10px!important;}
It will change the font size of h2 as the class applied .
Read this doc for more info : https://docs.joomla.org/Page_Class_Suffixdarengr Frienddarengr
- Join date:
- January 2012
- Posts:
- 108
- Downloads:
- 112
- Uploads:
- 30
- Thanks:
- 4
- Thanked:
- 1 times in 1 posts
January 13, 2016 at 5:38 pm #846906thank you very much for the help, I have had one . wrong in my first attempt!
I read the page you suggested, but it has no syntax examples… just the theory behind.best regards!
AuthorPostsViewing 12 posts - 1 through 12 (of 12 total)This topic contains 11 replies, has 2 voices, and was last updated by darengr 8 years, 10 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum