@phenomlab yes itโs a different theme. The other one was not offering much on editable sidebar. It was like flarum hahah
Footer bar add center text
-
@DownPW Iโll try again a bit later and provide full html and css. Iโll base it on your site.
-
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.
-
@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%; }
-
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;
-
@phenomlab On floatright ?
-
@DownPW Test in floatright = same result
-
@DownPW sorry. Try either
display: inline;
Or
display: inline-block;
You might need
!important
depending on cascading settingsEdit - for clarity, this should be in the
#floatcenter
block -
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.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 parentdiv
.In the above CSS you could try to set
width
toauto
rather than50%
, but then you will need to setwidth: 100%;
on the parentdiv
-
I have test with
width: 50%;
, I have the floatright OK with not space like before but the text is not centered. -
@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?
-
Yep I will set
display: none
on floatcenter div for waitingI notice I can centered the text when I play with
margin-left
for example but is not auto-centered according to the textItโ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.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 setposition: 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. -
Ah ok you play with
max-width: 50%;
on floatcenter andposition: sticky;
on floatrightThatโ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
-
@DownPW that should work - unless itโs inherited higher up in the cascade. If you resize the browser to match a mobile device, does it appear in the DOM?
-
@DownPW said in Footer bar add center text:
If you have a better solution tell me Mark
A big big thank you broNo, that should work and itโs a good mix. Just watch for very large displays as you may get unexpected placing of elements, but I doubt anyone will ever encounter this unless they run their browser using the entire screen estate.
Highly unlikely I think.
-
I did the test on my desktop 34-inch screen in browser full screen and it works, then goes on my smartphone. (OnePlus 8T)
Everything is fine unless I missed something
I mark as solved
-
-
@DownPW thatโs great news. Seems to work on my 32" desktop monitor fine, and also on my OnePlus 9 Pro
Did this solution help you?
Related Topics
-
-
-
-
-
-
-
Reading Meter Progress bar
Locked Solved Customisation -
Bug Navbar CSS
Solved Customisation