Skip to content

Footer bar add center text

Solved Customisation
41 2 9.1k 1
  • @phenomlab

    Nope Same Result.

    Nothing change 😞

    @DownPW that’s strange. I used your code to add the additional element and bound the css I supplied above and it worked fine.

    Can you check and see if the css is being overridden somewhere?

  • @DownPW that’s strange. I used your code to add the additional element and bound the css I supplied above and it worked fine.

    Can you check and see if the css is being overridden somewhere?

    @phenomlab

    51054ca1-88bc-4ec7-b4c5-21a0c5e0a0eb-image.png
    e751af3a-77f2-4680-aaff-bfaa16c64fe5-image.png

    No the code is here But the floatright div is invisible .

  • @phenomlab

    51054ca1-88bc-4ec7-b4c5-21a0c5e0a0eb-image.png
    e751af3a-77f2-4680-aaff-bfaa16c64fe5-image.png

    No the code is here But the floatright div is invisible .

    @DownPW again, odd. I’ll need to have another look at this and revert. ,

  • Nothing conclusive on my side

  • Nothing conclusive on my side

    @DownPW I’ll try again a bit later and provide full html and css. I’ll base it on your site.

  • @phenomlab

    51054ca1-88bc-4ec7-b4c5-21a0c5e0a0eb-image.png
    e751af3a-77f2-4680-aaff-bfaa16c64fe5-image.png

    No the code is here But the floatright div is invisible .

    Ok the code I provided above is the same as my website. But do like you want my friends if you prefer 😉

  • Ok the code I provided above is the same as my website. But do like you want my friends if you prefer 😉

    @DownPW I thought it looked familiar. When I checked yesterday the central text part was missing, so I’ll add that via the console and develop from there. This will only be visible for my browser session so no impact to anyone else.

  • Ok the code I provided above is the same as my website. But do like you want my friends if you prefer 😉

    @DownPW I see the issue. Use my CSS still, but from your CSS, remove

    #floatright {
        display: flex;
    }
    

    You should land up with

    #floatcenter {
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        font-weight: bold;
        color: #666666 !important;
        margin: 0 auto;
        text-align: center;
        width: 50%;
    }
    

    b37d32dd-873a-4817-8da5-4411d2ebea74-image.png

  • @DownPW I see the issue. Use my CSS still, but from your CSS, remove

    #floatright {
        display: flex;
    }
    

    You should land up with

    #floatcenter {
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        font-weight: bold;
        color: #666666 !important;
        margin: 0 auto;
        text-align: center;
        width: 50%;
    }
    

    b37d32dd-873a-4817-8da5-4411d2ebea74-image.png

    @phenomlab

    Nope same problem with :

    #floatcenter {
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        font-weight: bold;
        color: #666666 !important;
        margin: 0 auto;
        text-align: center;
        width: 50%;
    }
    
    .textcenter {
        margin-left: auto;
        margin-right: auto;
        font-weight: 800 !important;
    }
    
    
    #floatright {
        float: right;
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        /*display: flex;*/
    }
    
  • @phenomlab

    Nope same problem with :

    #floatcenter {
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        font-weight: bold;
        color: #666666 !important;
        margin: 0 auto;
        text-align: center;
        width: 50%;
    }
    
    .textcenter {
        margin-left: auto;
        margin-right: auto;
        font-weight: 800 !important;
    }
    
    
    #floatright {
        float: right;
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        /*display: flex;*/
    }
    

    @DownPW try with

    display: inherit;
    
  • @DownPW try with

    display: inherit;
    

    @phenomlab On floatright ?

  • @phenomlab On floatright ?

    @DownPW Test in floatright = same result

  • @DownPW Test in floatright = same result

    @DownPW sorry. Try either

    display: inline;
    

    Or

    display: inline-block;
    

    You might need !important depending on cascading settings

    Edit - for clarity, this should be in the #floatcenter block

  • @DownPW sorry. Try either

    display: inline;
    

    Or

    display: inline-block;
    

    You might need !important depending on cascading settings

    Edit - for clarity, this should be in the #floatcenter block

    @phenomlab

    Houra, it’s OK with inline-block

    On the other hand, I see that the text is well centered in the div but I notice that the div itself is not centered.
    Indeed I see a substantial space between the floatcenter div and floatright div.
    You can see it in the screenshot below.

    e1fb1c73-e19d-4548-aa73-9f8456830018-image.png

    Again my HTML/CSS

    <div id="floatcenter"> Some centered text
        </div>
    
    #floatcenter {
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        font-weight: bold;
        color: #666666 !important;
        margin: auto auto;
        text-align: center;
        width: 50%;
        display: inline-block !important;
    }
    
  • @phenomlab

    Houra, it’s OK with inline-block

    On the other hand, I see that the text is well centered in the div but I notice that the div itself is not centered.
    Indeed I see a substantial space between the floatcenter div and floatright div.
    You can see it in the screenshot below.

    e1fb1c73-e19d-4548-aa73-9f8456830018-image.png

    Again my HTML/CSS

    <div id="floatcenter"> Some centered text
        </div>
    
    #floatcenter {
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        font-weight: bold;
        color: #666666 !important;
        margin: auto auto;
        text-align: center;
        width: 50%;
        display: inline-block !important;
    }
    

    @DownPW strange. I don’t recall seeing that issue when I created this using the console live on your site. This is likely due to width constraints on the parent div.

    In the above CSS you could try to set width to auto rather than 50%, but then you will need to set width: 100%; on the parent div

  • @DownPW strange. I don’t recall seeing that issue when I created this using the console live on your site. This is likely due to width constraints on the parent div.

    In the above CSS you could try to set width to auto rather than 50%, but then you will need to set width: 100%; on the parent div

    @phenomlab

    I have test with width: 50%;, I have the floatright OK with not space like before but the text is not centered.

    4ff9abbf-889c-42ac-9202-3dd1465eb0c7-image.png

  • @phenomlab

    I have test with width: 50%;, I have the floatright OK with not space like before but the text is not centered.

    4ff9abbf-889c-42ac-9202-3dd1465eb0c7-image.png

    @DownPW ok. Let me have a look at this later. Can you leave everything as it is - I know it doesn’t look right but I want to make sure the right css is provided for the html you are using and it’s easier to do this live.

    Perhaps set the floatcenter element to be hidden for the time being?

  • @DownPW ok. Let me have a look at this later. Can you leave everything as it is - I know it doesn’t look right but I want to make sure the right css is provided for the html you are using and it’s easier to do this live.

    Perhaps set the floatcenter element to be hidden for the time being?

    @phenomlab

    Yep I will set display: none on floatcenter div for waiting

    I notice I can centered the text when I play with margin-left for example but is not auto-centered according to the text

    It’s still better but I would like it to center automatically based on the text rather than manually.

    we will get there

  • @phenomlab

    Yep I will set display: none on floatcenter div for waiting

    I notice I can centered the text when I play with margin-left for example but is not auto-centered according to the text

    It’s still better but I would like it to center automatically based on the text rather than manually.

    we will get there

    @DownPW Ok, try this

    #floatcenter {
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        font-weight: bold;
        color: #666666 !important;
        margin: 0 auto;
        text-align: center !important;
        max-width: 50%;
    }
    #floatright {
        float: right;
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        display: flex;
        position: sticky;
    }
    

    Don’t add to the CSS blocks you have - you need to replace them. This should yield the below - see the position markers - the lilac is centered on the screen, whilst the other two div tags occupy the remainder.

    055d6573-f3d7-41b0-93f3-8bfff20737b4-image.png

    There is a caveat in the sense that this doesn’t scale very well - mostly because of the existing position: fixed; and the need to set position: sticky; on the right-most element of #floatright. Based on this, it would be sensible to hide #floatcenter on the mobile breakpoints to prevent the text from overlapping.

  • @DownPW Ok, try this

    #floatcenter {
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        font-weight: bold;
        color: #666666 !important;
        margin: 0 auto;
        text-align: center !important;
        max-width: 50%;
    }
    #floatright {
        float: right;
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        display: flex;
        position: sticky;
    }
    

    Don’t add to the CSS blocks you have - you need to replace them. This should yield the below - see the position markers - the lilac is centered on the screen, whilst the other two div tags occupy the remainder.

    055d6573-f3d7-41b0-93f3-8bfff20737b4-image.png

    There is a caveat in the sense that this doesn’t scale very well - mostly because of the existing position: fixed; and the need to set position: sticky; on the right-most element of #floatright. Based on this, it would be sensible to hide #floatcenter on the mobile breakpoints to prevent the text from overlapping.

    @phenomlab

    Ah ok you play with max-width: 50%; on floatcenter and position: sticky; on floatright

    That’s smart 😉 I didn’t necessarily think of that.


    The result is perfect except on smartphone as you said.

    –> I tried this as usual but it doesn’t work. An idea?

    @media (max-width: 768px) {
        #floatcenter {
            display: none !important;
        }  
    }
    

    EDIT: Yep this code works for not display floatcenter div. I must find for floatright div
    EDIT2: Ok @phenomlab with floatright div with this code :

    @media (max-width: 767px) {
    #floatright {
        float: right;
        bottom: 1px;
        font-size: 90%;
        line-height: 2.3;
        display: flex !important;
        position: static;
    } 
    }
    

    If you have a better solution tell me Mark 😉

    A big big thank you bro 👍


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics