Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1405400

    Hey there,

    perhaps you can help me.
    I tried tons of Css, but no matter how i try:
    as soon as I add a class, which makes an underline, the text is left flush left.
    But I want it to be centered.

    Do you know if theres some way to get this effect on centered Text?

    Here’s my Css:

    .underline-mittelachsig {
      position: relative;
      display: inline-block;
      font-family: futura-pt, sans-serif;
      font-weight: 500;
      font-style: normal;
      text-transform: uppercase;
      letter-spacing: 0.2em;
      text-align: center!important;
    }
    
    .underline-mittelachsig::after {
      content: "";
      position: absolute;
      bottom: 3px;
      left: 0;
      right: 0;
      margin: 0 auto;
      width: 100%;
      height: 7px;
      background-color: #ff0053;
    }
    

    Thank you!
    Monika

    #1405405

    Without a link to the issue – it is hard to give advice.
    where did you add that custom class – to what element?

    #1405406

    Hi guenni,

    the Link is in the private Section.
    Do you also need a user login?

    #1405479

    Hi,

    Thank you for the inquiry.

    We adjusted the css code a bit.

    .underline-linksbuendig {
        position: relative;
        display: block;
        font-family: futura-pt, sans-serif;
        font-weight: 500;
        font-style: normal;
        text-transform: uppercase;
        letter-spacing: 0.2em;
        width: 100%;
    }
    
    .underline-linksbuendig::after {
        content: "";
        position: absolute;
        bottom: -10px;
        left: 0;
        width: 100%;
        border-bottom: 7px solid #ff0053;
    }
    

    Best regards,
    Ismael

    • This reply was modified 1 year, 8 months ago by Rikard.
    #1405488

    ok

    #1405813

    Hi,

    Thanks for pointing that out @guenni007, I’ve edited Ismaels code :-)

    Best regards,
    Rikard

    #1405916

    Thank you Very much Ismael.

    Now its realy centered!

    Would it also be possible to puit the unnderline directly under the text? Now its much longer.
    See link in private Section.

    This is the code:

    .underline-mittelachsig {
        position: relative;
        display: block;
        font-family: futura-pt, sans-serif;
        font-weight: 500;
        font-style: normal;
        text-transform: uppercase;
        letter-spacing: 0.2em;
        width: 100%;
    }
    
    .underline-mittelachsig::after {
        content: "";
        position: absolute;
        bottom: -10px;
        left: 0;
        width: 100%;
        border-bottom: 7px solid #ff0053;
    }
    
    #1405991

    Hi,
    Thank you for the link to your site, to have the text centered for your textblock element with the custom class underline-mittelachsig
    please do not use the inline style text-align: center;, I’m not sure if you are manually adding it or if you are using the text center option in the text element.
    Then use this css instead:

    #top .underline-mittelachsig {
        position: relative;
        display: flex;
        font-family: futura-pt, sans-serif;
        font-weight: 500;
        font-style: normal;
        text-transform: uppercase;
        letter-spacing: 0.2em;
        justify-content: center;
    }
    #top .underline-mittelachsig h1 {
        border-bottom: 7px solid #ff0053;
        padding-bottom: 10px;
    }
    

    I linked to my test page below, this is the expected results:
    Enfold_Support_1901.jpeg
    Best regards,
    Mike

    #1405992

    That Worked!!
    You are amazing, Thank you so much!
    :)

    Cheers
    Monika

    #1405993

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Underline is not possible for centered Text’ is closed to new replies.