Jump to content


Photo
Filtering

Change font size of item title

font-size

Best Answer ellenmva , 09 February 2014 - 02:57 PM

@caspersjan You were so close. One more selector since the item title is wrapped in an h4 tag.

 

Try this

 
.section-filtering .filtering .item .item-title h4 {
  font-size: 80%;
}

Let me know if that works.

 

Ellen

Go to the full post


  • Please log in to reply
5 replies to this topic

#1 caspersjan

caspersjan

    Super Member

  • Members
  • 125 posts
  • Country: Country Flag

Posted 07 February 2014 - 09:32 PM

Hello, I am just putting Filtering on a new site. It is always such a pleasure to work with it!

 

But I am trying and trying to change the font size of the item title, in DMS Custom CSS. While I can change the color and text-align no problem but whatever I do the font size remains the same. I tried px, % and em, none seem to work. Here is an example:

 

body.page-id-13 .section-filtering .filtering .item .item-title {
text-align: center;  color: black; font-size: 80%;

}

 

As I said, text-align and color work perfectly, but the font-size won't budge. I even tried !important to override any inline stye though I'm really out of my depth there and I'm told it's not good practice anyway.

 

It is quite probably something I'm doing or not doing. If you know the answer please enlighten me! If I could change the size (and ideally weight, too) of the font I'd be very happy indeed!

 

Thank you for your assistance. Yours faithfully, Jan.



#2 ellenmva

ellenmva

    Super Member

  • Members

  • 247 posts
  • LocationMassachusetts
  • Country: Country Flag

Posted 09 February 2014 - 02:57 PM   Best Answer

@caspersjan You were so close. One more selector since the item title is wrapped in an h4 tag.

 

Try this

 
.section-filtering .filtering .item .item-title h4 {
  font-size: 80%;
}

Let me know if that works.

 

Ellen



#3 caspersjan

caspersjan

    Super Member

  • Members
  • 125 posts
  • Country: Country Flag

Posted 09 February 2014 - 04:35 PM

Dear Ellen, it does indeed! I am half-way there to understanding selectors - now I shall have to learn about h4 tags, too. But learning is to be alive, of course!.  Thank you for your care and advice. Yours faithfully, Jan.

 

P.S.: Not yet quite understanding how it works, I tried your h4 magic on another problem I have been trying to solve for a while: How to hide the author and byline in the post-info, so that only the date remains (which can be so handily configured from within your section). My initial line of enquiry was this:

 
.section-filtering .filtering .post-info .author .byline {
display: none;
}
 
It had not worked so far. So straight away I tried the h4 trick but no joy yet. If you know of an easy way to do this I'd be grateful for another pointer!


#4 ellenmva

ellenmva

    Super Member

  • Members

  • 247 posts
  • LocationMassachusetts
  • Country: Country Flag

Posted 09 February 2014 - 06:57 PM

@caspersjan Okay, that's a little more difficult because the date and author don't have selectors, the last selector is .post-info. I'll add classes in the next update but that doesn't help you right now. So, we can do it with a bit of jQuery.

 

In the Custom Tab, click on Custom Scripts and in that box paste the following code:

 
<script>
  jQuery(document).ready(function(){      
 jQuery('.section-filtering .filtering .item .post-info').html(jQuery('.section-filtering .filtering .item .post-info').html().replace("By",""));
    jQuery('.section-filtering .filtering .item .post-info a').css('display' , 'none');
  });

</script>

We could have done .section-filtering .filtering .item .post-info a {display: none;} but the By still stays, that's why the jQuery.

 

Let me know if it works.

 

Ellen



#5 caspersjan

caspersjan

    Super Member

  • Members
  • 125 posts
  • Country: Country Flag

Posted 09 February 2014 - 07:25 PM

Dear Ellen, you are a star! Thank you so much, that works perfectly, straight out of the box. And I'm doubly happy - for having this problem solved and for your generous assistance. It spurns me on to try to figure out things myself, knowing that if I do get stuck I have someone knowledgeable to turn to!

Yours faithfully, Jan.

P.S.: I showed the first draft of the current implementation of Filtering (project documentation feedback from youth workers - posts are automatically populated from an online form and go straight into a Filtering section where they can be filtered by categories) to my colleagues today and they were amazed and delighted at the sprightly action. It really is a beautiful tool!


  • ellenmva likes this

#6 caspersjan

caspersjan

    Super Member

  • Members
  • 125 posts
  • Country: Country Flag

Posted 10 February 2014 - 03:24 PM

Dear Ellen, it is always two steps forward, one step back... I was so happy with your script that solved my problem and thus put the final touches to the filtered gallery I had tried to build, but alas when I came back to it this morning DMS had stopped working altogether. The Editor would not open and the spinning wheel made my head spin with a rush of worries. The site was still operational when logged out, so all was obiously not lost, but it's a shock still. Disabling plugins did not work, but just after I'd written to DMS support I discovered the Pagelines tab in the Dashboard which has a DMS Header Scripts Fallback and allowed me to delete the JQuery again. Everything is back to normal - including the Author and "By". I'll keep them there for now and wait until you get a chance to add classes in an update. Unless you can think of something that could make this script digestible to the DMS Editor.

Still, thanks a lot for trying to work out the original problem. It could not have been foreseen that another, much more dramatic one would result - though thankfully the drama was short and unspectacular in the end... Yours faithfully, Jan.


  • KimAnn03 likes this



Also tagged with one or more of these keywords: Filtering, font-size