[Resolved] CSS Style for “Before text” in Headline/Post Meta block?

Home Forums Support [Resolved] CSS Style for “Before text” in Headline/Post Meta block?

Home Forums Support CSS Style for “Before text” in Headline/Post Meta block?

  • This topic has 7 replies, 3 voices, and was last updated 2 years ago by Ying.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2171780
    William

    Aloha πŸ™‚

    Do you all have a secret CSS style that targets the “Before text” in Headline/Post Meta block?

    CSS style

    It’s a bit beyond my skill level.

    I just want to bold and color if possible πŸ™‚

    Example: https://cssopps.flywheelsites.com/internships/partners-in-development-foundation/

    Much thanks as always!

    -Bill

    #2171799
    Fernando
    Customer Support

    Hi Bill,

    You may achieve this through the following steps.

    1. Change the font-weight and color of the Block in the Editor: https://share.getcloudapp.com/qGu7Xx2O
    2. Then add Class: my-modify-text: https://share.getcloudapp.com/o0uREX5o
    3. Then add this custom CSS code in Appearance > Customize > Additional CSS:

    .gb-headline.my-modify-text > *{
        color:rgb(0, 0, 0);
        font-weight:normal;;
    }

    Kindly modify rgb(0,0,0) to your preferred color: https://www.w3schools.com/colors/colors_picker.asp

    End result: https://share.getcloudapp.com/YEurXW5n

    Hope this helps! πŸ™‚

    #2172744
    William

    WOW!! Thanks Fernando!

    So you’re leveraging the Editor style’s ‘power’ over the Customizer CSS rule to your advantage?

    I would never have gotten that!! πŸ™‚

    Two follow-ups:

    1) Is there any way to ‘reverse’ the rule? … ie. the CSS controls the ‘Post before’ text rather than the Editor.

    2) The CSS rule wipes my link style (color and underline) … any way to get CSS control back?

    Hover over Organization: Honolulu Complete Streets here: https://cssopps.flywheelsites.com/internships/honolulu-complete-streets/

    I tried setting link color in Editor, but no luck there.

    -bill

    #2172788
    Ying
    Staff
    Customer Support

    Hi William,

    I don’t think there’s a good way to style the before text.

    I can only think of the ones with a link, so the CSS could be:

    .gb-headline.my-modify-text > *:not(a){
        color:rgb(0, 0, 0);
        font-weight:normal;;
    }

    But for text only ones, it’s impossible to target.

    If different style is really important, then I would recommend using theinline-width for the meta field text and before text, see the example below:
    https://www.screencast.com/t/0fvSp7qGl

    #2172946
    William

    Aloha Ying,

    I wrapped the Before text in a ‘strong’ tag – then styled the strong tag πŸ™‚

    Example: https://ibb.co/Jz1kV6t

    Would you strongly advise against this?

    It seems to work πŸ™‚

    https://cssopps.flywheelsites.com/internships/honolulu-complete-streets/

    Thank you!!

    -bill

    #2172953
    Ying
    Staff
    Customer Support

    I wrapped the Before text in a β€˜strong’ tag – then styled the strong tag

    That’s a genius move πŸ˜›

    Would you strongly advise against this?

    Why would I? I learnt some smart trick from you πŸ™‚ Thanks!

    #2172956
    William

    I taught you something!??!?

    OMG – I can RETIRE now!! πŸ™‚

    You made my day – Thanks Ying!

    You the best!

    -bill

    #2172960
    Ying
    Staff
    Customer Support

    You made my day too!

    I just said it’s impossible to target, and then you came up with this smart little idea! Love it πŸ˜›

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.