@phenomlab hi Mark, no worries. I will definitely write my experience here… 🙂
Unfortunately, I could not find time to try it yet.
@DownPW Do you have this setup in a dev environment anywhere? If not, no issue - I can reproduce it in mine.
Arf not sorry, not under my hand directly.
@DownPW No problems. Try adding this additional CSS
#floatcenter {
margin: 0 auto;
text-align: center;
width: 50%;
}
@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 again, odd. I’ll need to have another look at this and revert. ,
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.
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 settings
Edit - 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 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
I have test with width: 50%;
, I have the floatright OK with not space like before but the text is not centered.